Changeset 2546:e9b5815be220 for admin/js/meta-editor.js
- Timestamp:
- 11/14/13 14:05:49 (12 years ago)
- Branch:
- 2.6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/meta-editor.js
r2545 r2546 1 1 //~ metaEditor & metaEditor.prototype should go to the core. 2 function metaEditor(target,meta_field,meta_type ) {2 function metaEditor(target,meta_field,meta_type,meta_options) { 3 3 this.target = target; 4 4 5 this.meta_field = meta_field; 5 6 this.meta_type = meta_type; 7 this.meta_url = meta_options.meta_url || this.meta_url; 8 this.list_type = meta_options.list_type || this.list_type; 9 this.text_confirm_remove = meta_options.text_confirm_remove || this.text_confirm_remove; 10 this.text_add_meta = meta_options.text_add_meta || this.text_add_meta; 11 this.text_choose = meta_options.text_choose || this.text_choose; 12 this.text_all = meta_options.text_all || this.text_all; 13 this.text_separation = meta_options.text_separation || this.text_separation; 6 14 }; 7 15 … … 13 21 text_all: 'all', 14 22 text_separation: 'Separate each %s by comas', 23 list_type: 'more', 15 24 16 25 target: null, … … 124 133 } 125 134 126 this.showMetaList( metaEditor.prototype.meta_type,this.target);127 128 }, 129 130 showMetaList: function( type,target) {135 this.showMetaList(this.list_type,this.target); 136 137 }, 138 139 showMetaList: function(list_type,target) { 131 140 132 141 var params = { … … 136 145 }; 137 146 138 if ( type == 'more') {147 if (list_type == 'more') { 139 148 params.limit = '30'; 140 149 } … … 167 176 }); 168 177 169 if ( type == 'more') {178 if (list_type == 'more') { 170 179 var a_more = $('<a href="#" class="metaGetMore"></a>'); 171 180 a_more.append(This.text_all + String.fromCharCode(160)+String.fromCharCode(187)); … … 177 186 } 178 187 179 if ( type != 'more-all') {188 if (list_type != 'more-all') { 180 189 pl.addClass('hide'); 181 190
Note: See TracChangeset
for help on using the changeset viewer.