shopifine /magehelp/application/views/utilities/add_category.php

Language PHP Lines 149
MD5 Hash dff3b786cbfc9482e60d6b8fa1ad3125 Estimated Cost $126 (why?)
Repository https://bitbucket.org/jit_bec/shopifine.git View Raw File View Project SPDX
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<html>
    <head>
       <?php $this->load->view("common/header"); ?>
        <link rel="stylesheet" rev="stylesheet" href="<?php echo base_url();?>css/shopifine.css" />
        <script type="text/javascript" src="http://static.jstree.com/v.1.0pre/jquery.jstree.js"></script>
        <style type="text/css">
        * { font-family: Verdana; font-size: 96%; }
        label { width: 10em; float: left; }
        label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
        p { clear: both; }
        .submit { margin-left: 12em; }
        em { font-weight: bold; padding-right: 1em; vertical-align: top; }
        .field {
    clear:both;
}
        </style>
        <script>
            $(document).ready(function(){
                 $("#treeViewDiv")
                 .jstree({
        "plugins" : ["themes", "json_data", "ui"],
        "json_data" : {
            "ajax" : {
                "type": 'GET',
                "url": function (node) {
                    var nodeId = "";
                    var url = ""
                    if (node == -1)
                    {
                        url = "index.php/utilities/renderParents";
                    }
                    else
                    {
                        nodeId = node.attr('id');
                        url = "index.php/utilities/renderChildren";
                    }

                    return url;
                },
                data : function(node) {
                    if (node != -1){
                        return {

                          "nodeid":$.trim(node.attr('id'))
                        }
                    }
            },
                "success": function (new_data) {
                    return new_data;
                }
            }
        }})
//                 .jstree({
//                  "json_data" : {
//            "ajax" : {
//                "type": 'GET',
//                "url": function (node) {
//                    var nodeId = "";
//                    var url = ""
//                    if (node == -1)
//                    {
//                        url = "http://localhost/introspection/introspection/product/";
//                    }
//                    else
//                    {
//                        nodeId = node.attr('id');
//                        url = "http://localhost/introspection/introspection/children/" + nodeId;
//                    }
//
//                    return url;
//                },
//                "success": function (new_data) {
//                    return new_data;
//                }
//            }  
 //                 },
                 
//                    "json_data" : {
//                        "data":<?php echo $treedata ?>,
//                        "ajax" : {
//                            "url" : "index.php/utilities/renderChildren"
////                            data : function(n) {
////                                     return {
////                                       "nodeid":$.trim(n.attr('id'))
////                                     }
////                                   }
//                        }
//                    },
//                    
//                    "plugins" : [ "themes", "json_data", "ui" ]
//"json_data" : {
    //"data":<?php echo $treedata ?>,
   // "data":[{"data":"Furniture","attr":{"id":"10"},"state":"closed"},{"data":"Electronics","attr":{"id":"13"},"state":"closed"},{"data":"Apparel","attr":{"id":"18"},"state":"closed"},{"data":"Household Items","attr":{"id":"20"},"state":"closed"},{"data":"Home","attr":{"id":"36"},"state":"closed"}],
//			"data" : [
//				{ 
//					"data" : "A node", 
//					"state" : "closed"
//				},
//{"data":"Furniture","attr":{"id":"10"},"state":"closed"},
//				{ 
//					"attr" : { "id" : "li.node.id3" }, 
//					"data" : { 
//						"title" : "Long format demo", 
//						"attr" : { "href" : "#" } 
//					} 
//				}
//			],
//			"ajax" : { "url" : "index.php/utilities/renderChildren" }
//		},
//		"plugins" : [ "themes", "json_data" ]
//                })
                    $("#test").click(function(){console.log($('#treeViewDiv').jstree('get_selected').data('id'));
})
    $("#testattr").click(function(){console.log($('#treeViewDiv').jstree('get_selected').attr('id'));
                    })

            });
        </script>
    </head>
     
    <body>
         <?php $this->load->view("common/menubar"); ?>
        <div id="treeViewDiv">
        </div>

<button id="test">test</button>
<button id="testattr">test Attr</button>
​
<!--        <div id="categoryForm" class="utilityform">
        <form action="index.php/utilities/createCategory" method="post" id="deliverypointform">
            <fieldset>
            <div>
               
                
               
                   
            
            </div>
                </fieldset>
        </form>
</div>-->
        <?php $this->load->view("partial/footer"); ?>
    </body>
    
   
</html>
 

 
Back to Top