spree_core 0.30.2 → 0.40.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/admin/base_controller.rb +0 -31
- data/app/controllers/admin/orders_controller.rb +10 -9
- data/app/controllers/admin/overview_controller.rb +1 -1
- data/app/controllers/admin/products_controller.rb +8 -8
- data/app/controllers/admin/properties_controller.rb +1 -1
- data/app/controllers/admin/shipments_controller.rb +6 -3
- data/app/controllers/admin/shipping_methods_controller.rb +1 -1
- data/app/controllers/admin/tax_rates_controller.rb +2 -2
- data/app/controllers/admin/taxons_controller.rb +1 -2
- data/app/controllers/admin/users_controller.rb +7 -8
- data/app/controllers/admin/variants_controller.rb +2 -2
- data/app/controllers/countries_controller.rb +1 -1
- data/app/controllers/locale_controller.rb +1 -1
- data/app/controllers/spree/base_controller.rb +1 -117
- data/app/controllers/states_controller.rb +1 -1
- data/app/helpers/spree/base_helper.rb +1 -7
- data/app/helpers/taxons_helper.rb +2 -2
- data/app/models/app_configuration.rb +0 -3
- data/app/models/calculator/flat_percent_item_total.rb +2 -1
- data/app/models/calculator/vat.rb +1 -1
- data/app/models/creditcard.rb +1 -1
- data/app/models/gateway/authorize_net.rb +13 -2
- data/app/models/gateway/authorize_net_cim.rb +11 -0
- data/app/models/gateway/beanstream.rb +30 -7
- data/app/models/inventory_unit.rb +21 -31
- data/app/models/line_item.rb +7 -8
- data/app/models/order.rb +4 -1
- data/app/models/product_group.rb +4 -8
- data/app/models/property.rb +1 -3
- data/app/models/return_authorization.rb +6 -1
- data/app/models/state_event.rb +3 -3
- data/app/models/state_monitor.rb +16 -16
- data/app/models/taxon.rb +6 -7
- data/app/models/user.rb +4 -0
- data/app/views/admin/general_settings/edit.html.erb +0 -8
- data/app/views/admin/general_settings/show.html.erb +5 -10
- data/app/views/admin/images/_form.html.erb +1 -1
- data/app/views/admin/images/index.html.erb +1 -1
- data/app/views/admin/option_types/new.html.erb +1 -1
- data/app/views/admin/orders/_add_product.html.erb +3 -3
- data/app/views/admin/orders/_form.html.erb +3 -0
- data/app/views/admin/orders/_user_form.html.erb +1 -1
- data/app/views/admin/orders/index.html.erb +2 -2
- data/app/views/admin/orders/show.html.erb +3 -8
- data/app/views/admin/orders/user.html.erb +1 -1
- data/app/views/admin/product_groups/index.html.erb +1 -1
- data/app/views/admin/product_groups/show.html.erb +1 -1
- data/app/views/admin/products/index.html.erb +1 -1
- data/app/views/admin/return_authorizations/_form.html.erb +3 -1
- data/app/views/admin/shared/_address_form.html.erb +1 -1
- data/app/views/admin/shared/_configuration_menu.html.erb +11 -11
- data/app/views/admin/shared/_order_tabs.html.erb +12 -12
- data/app/views/admin/shared/_product_tabs.html.erb +6 -6
- data/app/views/admin/states/_state_list.html.erb +2 -2
- data/app/views/admin/taxonomies/_js_head.html.erb +6 -8
- data/app/views/admin/taxonomies/edit.html.erb +11 -11
- data/app/views/admin/taxonomies/get_children.json.erb +5 -5
- data/app/views/admin/taxons/available.js.erb +10 -10
- data/app/views/admin/taxons/selected.html.erb +13 -13
- data/app/views/admin/variants/index.html.erb +1 -1
- data/app/views/checkout/_address.html.erb +2 -2
- data/app/views/layouts/admin.html.erb +1 -2
- data/app/views/layouts/spree_application.html.erb +1 -2
- data/app/views/shared/_admin_head.html.erb +3 -3
- data/app/views/shared/_doc_and_xmlns.html.erb +2 -0
- data/app/views/shared/_filters.html.erb +3 -28
- data/app/views/taxons/show.html.erb +7 -5
- data/config/initializers/spree.rb +1 -19
- data/config/locales/en.yml +0 -2
- data/config/routes.rb +3 -5
- data/db/migrate/20091007134354_change_taxons_to_nested_set.rb +2 -2
- data/lib/product_filters.rb +10 -11
- data/lib/scopes/product.rb +15 -0
- data/lib/spree/mail_settings.rb +2 -4
- data/lib/spree/preference_access.rb +3 -3
- data/lib/spree_base.rb +116 -0
- data/lib/spree_core.rb +3 -1
- data/lib/spree_core/preferences/model_hooks.rb +1 -1
- data/lib/tasks/install.rake +0 -1
- data/public/javascripts/admin.js +0 -6
- data/public/javascripts/admin/checkouts/edit.js +41 -40
- data/public/javascripts/admin/orders/edit_form.js +5 -4
- data/public/javascripts/jquery.cookie.js +96 -0
- data/public/javascripts/jquery.delayedobserver.js +35 -0
- data/public/javascripts/jsTree/jquery.jstree.js +3510 -0
- data/public/javascripts/jsTree/themes/apple/d.png +0 -0
- data/public/javascripts/jsTree/themes/apple/style.css +60 -34
- data/public/javascripts/jsTree/themes/apple/throbber.gif +0 -0
- data/public/javascripts/taxonomy.js +150 -149
- data/public/stylesheets/admin/admin.css +0 -34
- metadata +36 -43
- data/app/controllers/password_resets_controller.rb +0 -48
- data/app/helpers/users_helper.rb +0 -13
- data/app/models/spree/alert.rb +0 -13
- data/app/views/admin/shared/_alert.html.erb +0 -6
- data/app/views/shared/_login.html.erb +0 -21
- data/app/views/shared/_user_form.html.erb +0 -17
- data/lib/spree/i18n_utils.rb +0 -47
- data/public/javascripts/jquery.js +0 -19
- data/public/javascripts/jrails.autocomplete.js +0 -274
- data/public/javascripts/jrails.js +0 -1
- data/public/javascripts/jsTree/jquery.tree.js +0 -2058
- data/public/javascripts/jsTree/plugins/jquery.tree.contextmenu.js +0 -129
- data/public/javascripts/jsTree/themes/apple/icons.png +0 -0
Binary file
|
@@ -1,34 +1,60 @@
|
|
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
|
-
.
|
1
|
+
/*
|
2
|
+
* jsTree apple theme 1.0
|
3
|
+
* Supported features: dots/no-dots, icons/no-icons, focused, loading
|
4
|
+
* Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
|
5
|
+
*/
|
6
|
+
|
7
|
+
.jstree-apple > ul { background:url("bg.jpg") left top repeat; }
|
8
|
+
.jstree-apple li,
|
9
|
+
.jstree-apple ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
|
10
|
+
.jstree-apple li { background-position:-90px 0; background-repeat:repeat-y; }
|
11
|
+
.jstree-apple li.jstree-last { background:transparent; }
|
12
|
+
.jstree-apple .jstree-open > ins { background-position:-72px 0; }
|
13
|
+
.jstree-apple .jstree-closed > ins { background-position:-54px 0; }
|
14
|
+
.jstree-apple .jstree-leaf > ins { background-position:-36px 0; }
|
15
|
+
|
16
|
+
.jstree-apple a { border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px; text-shadow:1px 1px 1px white; }
|
17
|
+
.jstree-apple .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 3px 0 1px; text-shadow:1px 1px 1px silver; }
|
18
|
+
.jstree-apple .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 3px 0 1px; }
|
19
|
+
.jstree-apple a .jstree-icon { background-position:-56px -20px; }
|
20
|
+
.jstree-apple a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
|
21
|
+
|
22
|
+
.jstree-apple.jstree-focused { background:white; }
|
23
|
+
|
24
|
+
.jstree-apple .jstree-no-dots li,
|
25
|
+
.jstree-apple .jstree-no-dots .jstree-leaf > ins { background:transparent; }
|
26
|
+
.jstree-apple .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
|
27
|
+
.jstree-apple .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
|
28
|
+
|
29
|
+
.jstree-apple .jstree-no-icons a .jstree-icon { display:none; }
|
30
|
+
|
31
|
+
.jstree-apple .jstree-search { font-style:italic; }
|
32
|
+
|
33
|
+
.jstree-apple .jstree-no-icons .jstree-checkbox { display:inline-block; }
|
34
|
+
.jstree-apple .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
|
35
|
+
.jstree-apple .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
|
36
|
+
.jstree-apple .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
|
37
|
+
.jstree-apple .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
|
38
|
+
.jstree-apple .jstree-checked > a > .checkbox:hover { background-position:-38px -37px; }
|
39
|
+
.jstree-apple .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
|
40
|
+
.jstree-apple .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
|
41
|
+
|
42
|
+
#vakata-dragged.jstree-apple ins { background:transparent !important; }
|
43
|
+
#vakata-dragged.jstree-apple .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
|
44
|
+
#vakata-dragged.jstree-apple .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
|
45
|
+
#jstree-marker.jstree-apple { background:url("d.png") -41px -57px no-repeat !important; }
|
46
|
+
|
47
|
+
.jstree-apple a.jstree-search { color:aqua; }
|
48
|
+
|
49
|
+
#vakata-contextmenu.jstree-apple-context,
|
50
|
+
#vakata-contextmenu.jstree-apple-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
|
51
|
+
#vakata-contextmenu.jstree-apple-context li { }
|
52
|
+
#vakata-contextmenu.jstree-apple-context a { color:black; }
|
53
|
+
#vakata-contextmenu.jstree-apple-context a:hover,
|
54
|
+
#vakata-contextmenu.jstree-apple-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
|
55
|
+
#vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a,
|
56
|
+
#vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
|
57
|
+
#vakata-contextmenu.jstree-apple-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
|
58
|
+
#vakata-contextmenu.jstree-apple-context li ul { margin-left:-4px; }
|
59
|
+
|
60
|
+
/* TODO: IE6 support - the `>` selectors */
|
Binary file
|
@@ -1,191 +1,190 @@
|
|
1
1
|
var base_url = "/admin/taxonomies/" + taxonomy_id + "/taxons/";
|
2
2
|
var child_url = "/admin/taxonomies/" + taxonomy_id + "/get_children.json"
|
3
|
-
var
|
4
|
-
var delete_confirmed = false;
|
3
|
+
var is_cut = false;
|
5
4
|
var last_rollback = null;
|
6
5
|
|
7
6
|
var handle_ajax_error = function(XMLHttpRequest, textStatus, errorThrown){
|
8
|
-
jQuery.
|
9
|
-
|
7
|
+
jQuery.jstree.rollback(last_rollback);
|
10
8
|
jQuery("#ajax_error").show().html("<strong>" + server_error + "</strong><br/>" + taxonomy_tree_error);
|
11
9
|
};
|
12
10
|
|
13
|
-
var handle_move = function(li, target, droppped, tree, rb) {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
var
|
18
|
-
|
19
|
-
if(droppped=='inside'){
|
20
|
-
parent = target;
|
21
|
-
}else if(droppped=='after'){
|
22
|
-
parent = jQuery(target).parents()[1];
|
23
|
-
}else if(droppped=='before'){
|
24
|
-
parent = jQuery(target).parents()[1];
|
25
|
-
}
|
11
|
+
//var handle_move = function(li, target, droppped, tree, rb) {
|
12
|
+
var handle_move = function(e, data) {
|
13
|
+
last_rollback = data.rlbk;
|
14
|
+
var position = data.rslt.cp;
|
15
|
+
var node = data.rslt.o;
|
16
|
+
var new_parent = data.rslt.np;
|
26
17
|
|
27
18
|
jQuery.ajax({
|
28
19
|
type: "POST",
|
29
|
-
url: base_url +
|
30
|
-
data: ({_method: "put", "taxon[parent_id]":
|
20
|
+
url: base_url + node.attr("id") + ".json",
|
21
|
+
data: ({_method: "put", "taxon[parent_id]": new_parent.attr("id"), "taxon[position]": position, authenticity_token: AUTH_TOKEN}),
|
31
22
|
error: handle_ajax_error
|
32
23
|
});
|
33
24
|
|
34
25
|
return true
|
35
26
|
};
|
36
27
|
|
37
|
-
var
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
var
|
42
|
-
|
43
|
-
creating=true;
|
44
|
-
};
|
45
|
-
|
46
|
-
var handle_created = function(id,result) {
|
47
|
-
jQuery.tree.reference('taxonomy_tree').selected.attr('id', id);
|
48
|
-
}
|
49
|
-
|
50
|
-
var handle_rename = function(li, tree, rb) {
|
51
|
-
var name = jQuery(li).children(":first").text();
|
52
|
-
name = jQuery.trim(name);
|
53
|
-
|
54
|
-
if (creating){
|
55
|
-
//actually creating new
|
56
|
-
var position = jQuery(li).prevAll().length;
|
57
|
-
var parent = jQuery(li).parents()[1];
|
58
|
-
|
59
|
-
jQuery.ajax({
|
60
|
-
type: "POST",
|
61
|
-
url: base_url,
|
62
|
-
data: ({"taxon[name]": name, "taxon[parent_id]": parent.id, "taxon[position]": position, authenticity_token: AUTH_TOKEN}),
|
63
|
-
error: handle_ajax_error,
|
64
|
-
success: handle_created
|
65
|
-
});
|
66
|
-
|
67
|
-
creating = false;
|
68
|
-
}else{
|
69
|
-
//just renaming
|
70
|
-
last_rollback = rb;
|
71
|
-
|
72
|
-
jQuery.ajax({
|
73
|
-
type: "POST",
|
74
|
-
url: base_url + li.id + ".json",
|
75
|
-
data: ({_method: "put", "taxon[name]": name, authenticity_token: AUTH_TOKEN}),
|
76
|
-
error: handle_ajax_error
|
77
|
-
});
|
78
|
-
}
|
79
|
-
};
|
28
|
+
var handle_create = function(e, data) {
|
29
|
+
last_rollback = data.rlbk;
|
30
|
+
var node = data.rslt.obj;
|
31
|
+
var name = data.rslt.name;
|
32
|
+
var position = data.rslt.position;
|
33
|
+
var new_parent = data.rslt.parent;
|
80
34
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
}
|
89
|
-
}
|
35
|
+
jQuery.ajax({
|
36
|
+
type: "POST",
|
37
|
+
url: base_url,
|
38
|
+
data: ({"taxon[name]": name, "taxon[parent_id]": new_parent.attr("id"), "taxon[position]": position, authenticity_token: AUTH_TOKEN}),
|
39
|
+
error: handle_ajax_error,
|
40
|
+
success: function(id,result) {
|
41
|
+
node.attr('id', id);
|
42
|
+
}
|
43
|
+
});
|
90
44
|
|
91
|
-
return delete_confirmed;
|
92
45
|
};
|
93
46
|
|
94
|
-
var
|
95
|
-
last_rollback =
|
47
|
+
var handle_rename = function(e, data) {
|
48
|
+
last_rollback = data.rlbk;
|
49
|
+
var node = data.rslt.obj;
|
50
|
+
var name = data.rslt.new_name;
|
96
51
|
|
97
52
|
jQuery.ajax({
|
98
53
|
type: "POST",
|
99
|
-
url: base_url +
|
100
|
-
data: ({_method: "
|
54
|
+
url: base_url + node.attr("id") + ".json",
|
55
|
+
data: ({_method: "put", "taxon[name]": name, authenticity_token: AUTH_TOKEN}),
|
101
56
|
error: handle_ajax_error
|
102
57
|
});
|
58
|
+
};
|
59
|
+
|
60
|
+
var handle_delete = function(e, data){
|
61
|
+
last_rollback = data.rlbk;
|
62
|
+
var node = data.rslt.obj;
|
63
|
+
|
64
|
+
jConfirm('Are you sure you want to delete this taxon?', 'Confirm Taxon Deletion', function(r) {
|
65
|
+
if(r){
|
66
|
+
jQuery.ajax({
|
67
|
+
type: "POST",
|
68
|
+
url: base_url + node.attr("id"),
|
69
|
+
data: ({_method: "delete", authenticity_token: AUTH_TOKEN}),
|
70
|
+
error: handle_ajax_error
|
71
|
+
});
|
72
|
+
}else{
|
73
|
+
jQuery.jstree.rollback(last_rollback);
|
74
|
+
last_rollback = null;
|
75
|
+
}
|
76
|
+
});
|
103
77
|
|
104
|
-
delete_confirmed = false;
|
105
78
|
};
|
106
79
|
|
107
80
|
jQuery(document).ready(function(){
|
108
|
-
conf = {
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
}
|
116
|
-
},
|
117
|
-
ui : {
|
118
|
-
theme_name : "apple"
|
119
|
-
},
|
120
|
-
lang : {
|
121
|
-
new_node : new_taxon,
|
122
|
-
loading : loading + "..."
|
123
|
-
},
|
124
|
-
plugins : {
|
125
|
-
contextmenu : {
|
126
|
-
items : {
|
127
|
-
// get rid of the remove item
|
128
|
-
remove :{
|
129
|
-
visible : function (NODE, TREE_OBJ) { if(jQuery(NODE[0]).attr('rel')=="root") return false; return TREE_OBJ.check("renameable", NODE); },
|
130
|
-
},
|
131
|
-
rename :{
|
132
|
-
visible : function (NODE, TREE_OBJ) { if(jQuery(NODE[0]).attr('rel')=="root") return false; return TREE_OBJ.check("renameable", NODE); },
|
133
|
-
},
|
134
|
-
cut :{
|
135
|
-
id : "cut",
|
136
|
-
label : "Cut",
|
137
|
-
visible : function (NODE, TREE_OBJ) { if(NODE.length != 1 || NODE[0].id == 'root') return false; return true; },
|
138
|
-
action : function (NODE, TREE_OBJ) { TREE_OBJ.cut(NODE); jQuery(NODE).hide(); },
|
139
|
-
separator_before : true
|
140
|
-
},
|
141
|
-
paste :{
|
142
|
-
id : "paste",
|
143
|
-
label : "Paste",
|
144
|
-
visible : function (NODE, TREE_OBJ) { if(NODE.length != 1 || NODE[0].id == 'root') return false; return true; },
|
145
|
-
action : function (NODE, TREE_OBJ) { TREE_OBJ.open_branch(NODE); TREE_OBJ.paste(NODE, "inside"); jQuery(NODE).find("li").show(); }
|
146
|
-
},
|
147
|
-
edit :{
|
148
|
-
id : "edit",
|
149
|
-
label : "Edit",
|
150
|
-
visible : function (NODE, TREE_OBJ) { if(NODE.length != 1 || NODE[0].id == 'root') return false; return TREE_OBJ.check("renameable", NODE); },
|
151
|
-
action : function (NODE, TREE_OBJ) { jQuery.each(NODE, function () { window.location = base_url + this.id + "/edit/"; }); }
|
152
|
-
}
|
153
|
-
|
81
|
+
var conf = {
|
82
|
+
json_data : {
|
83
|
+
"data" : initial,
|
84
|
+
"ajax" : {
|
85
|
+
"url" : child_url,
|
86
|
+
"data" : function (n) {
|
87
|
+
return { parent_id : n.attr ? n.attr("id") : 0 };
|
154
88
|
}
|
155
89
|
}
|
156
90
|
},
|
157
|
-
|
158
|
-
|
159
|
-
|
91
|
+
"themes" : {
|
92
|
+
"theme" : "apple",
|
93
|
+
"url" : "/javascripts/jsTree/themes/apple/style.css"
|
94
|
+
},
|
95
|
+
"strings" : {
|
96
|
+
"new_node" : new_taxon,
|
97
|
+
"loading" : loading + "..."
|
160
98
|
},
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
99
|
+
"crrm" : {
|
100
|
+
"move" : {
|
101
|
+
"check_move" : function (m) {
|
102
|
+
var position = m.cp;
|
103
|
+
var node = m.o;
|
104
|
+
var new_parent = m.np;
|
105
|
+
|
106
|
+
if(!new_parent) return false; //no parent
|
107
|
+
|
108
|
+
if(node.attr("rel")=="root") return false; //can't drag root
|
109
|
+
|
110
|
+
if(new_parent.attr("id")=="taxonomy_tree" && position==0) return false; // can't drop before root
|
111
|
+
|
112
|
+
return true;
|
113
|
+
|
114
|
+
}
|
115
|
+
}
|
116
|
+
},
|
117
|
+
"contextmenu" : {
|
118
|
+
"items" : function(obj) {
|
119
|
+
var id_of_node = obj.attr("id");
|
120
|
+
var type_of_node = obj.attr("rel");
|
121
|
+
var menu = {};
|
122
|
+
if(type_of_node == "root") {
|
123
|
+
menu = {
|
124
|
+
"create" : {
|
125
|
+
"label" : "Create",
|
126
|
+
"action" : function (obj) { this.create(obj); }
|
127
|
+
},
|
128
|
+
"paste" : {
|
129
|
+
"separator_before" : true,
|
130
|
+
"label" : "Paste",
|
131
|
+
"action" : function (obj) { is_cut = false; this.paste(obj); },
|
132
|
+
"_disabled" : is_cut == false
|
133
|
+
},
|
134
|
+
"edit" : {
|
135
|
+
"separator_before" : true,
|
136
|
+
"label" : "Edit",
|
137
|
+
"action" : function (obj) { window.location = base_url + obj.attr("id") + "/edit/"; }
|
138
|
+
}
|
139
|
+
}
|
140
|
+
} else {
|
141
|
+
menu = {
|
142
|
+
"create" : {
|
143
|
+
"label" : "Create",
|
144
|
+
"action" : function (obj) { this.create(obj); }
|
145
|
+
},
|
146
|
+
"rename" : {
|
147
|
+
"label" : "Rename",
|
148
|
+
"action" : function (obj) { this.rename(obj); }
|
149
|
+
},
|
150
|
+
"remove" : {
|
151
|
+
"label" : "Remove",
|
152
|
+
"action" : function (obj) { this.remove(obj); }
|
153
|
+
},
|
154
|
+
"cut" : {
|
155
|
+
"separator_before" : true,
|
156
|
+
"label" : "Cut",
|
157
|
+
"action" : function (obj) { is_cut = true; this.cut(obj); }
|
158
|
+
},
|
159
|
+
"paste" : {
|
160
|
+
"label" : "Paste",
|
161
|
+
"action" : function (obj) { is_cut = false; this.paste(obj); },
|
162
|
+
"_disabled" : is_cut == false
|
163
|
+
},
|
164
|
+
"edit" : {
|
165
|
+
"separator_before" : true,
|
166
|
+
"label" : "Edit",
|
167
|
+
"action" : function (obj) { window.location = base_url + obj.attr("id") + "/edit/"; }
|
168
|
+
}
|
169
|
+
}
|
170
|
+
}
|
171
|
+
return menu;
|
169
172
|
}
|
170
173
|
},
|
171
|
-
callback : {
|
172
|
-
onmove: handle_move,
|
173
|
-
ondblclk: handle_dblclick,
|
174
|
-
onrename: handle_rename,
|
175
|
-
oncreate: handle_create,
|
176
|
-
beforedelete: handle_before_delete,
|
177
|
-
ondelete: handle_delete,
|
178
|
-
beforedata: function (n, t) {
|
179
|
-
if(n == false) t.settings.data.opts.static = initial;
|
180
|
-
else t.settings.data.opts.static = false;
|
181
|
-
|
182
|
-
return { parent_id : $(n).attr("id") || 0 };
|
183
|
-
}
|
184
174
|
|
185
|
-
|
175
|
+
"plugins" : [ "themes", "json_data", "dnd", "crrm", "contextmenu"]
|
186
176
|
}
|
187
177
|
|
188
|
-
jQuery("#taxonomy_tree").
|
178
|
+
jQuery("#taxonomy_tree").jstree(conf)
|
179
|
+
.bind("move_node.jstree", handle_move)
|
180
|
+
.bind("remove.jstree", handle_delete)
|
181
|
+
.bind("create.jstree", handle_create)
|
182
|
+
.bind("rename.jstree", handle_rename);
|
183
|
+
|
184
|
+
jQuery("#taxonomy_tree").delegate("a", "dblclick", function (e) {
|
185
|
+
jQuery("#taxonomy_tree").jstree("rename", this)
|
186
|
+
});
|
187
|
+
|
189
188
|
|
190
189
|
jQuery(document).keypress(function(e){
|
191
190
|
//surpress form submit on enter/return
|
@@ -194,3 +193,5 @@ jQuery(document).ready(function(){
|
|
194
193
|
}
|
195
194
|
});
|
196
195
|
});
|
196
|
+
|
197
|
+
|
@@ -577,37 +577,3 @@ table#product_scopes tr td table tr td {
|
|
577
577
|
}
|
578
578
|
|
579
579
|
|
580
|
-
span.handle{
|
581
|
-
background-image: url(../../images/reorder.jpg);
|
582
|
-
display: inline-block;
|
583
|
-
width:14px;
|
584
|
-
height:15px;
|
585
|
-
}
|
586
|
-
|
587
|
-
.alert {
|
588
|
-
-moz-border-radius: 5px;
|
589
|
-
-webkit-border-radius: 5px;
|
590
|
-
border-radius: 5px;
|
591
|
-
font-size: 1.3em;
|
592
|
-
margin-bottom: 1em;
|
593
|
-
padding: 0.8em;
|
594
|
-
}
|
595
|
-
.alert a.dismiss {
|
596
|
-
float:right;
|
597
|
-
font-size: 0.8em;
|
598
|
-
}
|
599
|
-
.alert.release {
|
600
|
-
background: #ccddff url(../images/shadow_top.png) 0px -50px repeat-x;
|
601
|
-
color: #556699;
|
602
|
-
border: 1px solid #99aacc;
|
603
|
-
}
|
604
|
-
.alert.security {
|
605
|
-
background: #f4b4b4 url(../images/shadow_top.png) 0px -50px repeat-x;
|
606
|
-
color: #000000;
|
607
|
-
border: 1px solid #e75b5b;
|
608
|
-
}
|
609
|
-
.alert.news {
|
610
|
-
background: #ccffd4 url(../images/shadow_top.png) 0px -50px repeat-x;
|
611
|
-
color: #000000;
|
612
|
-
border: 1px solid #66ff7e;
|
613
|
-
}
|