Changeset 1819:55a1746826ea
- Timestamp:
- 09/08/13 04:30:46 (12 years ago)
- Branch:
- Ticket #1539
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/meta-editor.js
r1741 r1819 113 113 114 114 addMetaDialog: function() { 115 var This = this;116 115 117 116 if (this.submit_button == null) { … … 121 120 } 122 121 123 // View meta list124 var a = $('<a href="#">' + this.text_choose + '</a>');125 a.click(function() {126 This.showMetaList(metaEditor.prototype.meta_type,$(this).parent());127 return false;128 });129 122 if (this.text_separation != '') { 130 123 this.target.append($('<p></p>').addClass('form-note').append(this.text_separation.replace(/%s/,this.meta_type))); 131 124 } 132 this.target.append($('<p></p>').append(a)); 125 126 this.showMetaList(metaEditor.prototype.meta_type,this.target); 127 133 128 }, 134 129 135 130 showMetaList: function(type,target) { 136 target.empty();137 target.append('...');138 target.addClass('addMeta');139 131 140 132 var params = { … … 151 143 152 144 $.get(this.service_uri,params,function(data) { 145 146 var pl = $('<p class="addMeta"></p>'); 147 148 $('.addMeta').remove(); 149 153 150 if ($(data).find('meta').length > 0) { 154 target.empty();151 pl.empty(); 155 152 var meta_link; 156 153 … … 165 162 166 163 if (i>0) { 167 target.append(', ');164 pl.append(', '); 168 165 } 169 target.append(meta_link);166 pl.append(meta_link); 170 167 }); 171 168 … … 177 174 return false; 178 175 }); 179 target.append(', ').append(a_more); 180 } 176 pl.append(', ').append(a_more); 177 178 pl.addClass('hide'); 179 180 var pa = $('<p></p>'); 181 target.append(pa); 182 183 var a = $('<a href="#" class="metaGetList">' + This.text_choose + '</a>'); 184 a.click(function() { 185 $('.addMeta').removeClass('hide'); 186 $('.metaGetList').remove(); 187 return false; 188 }); 189 190 pa.append(a); 191 } 192 193 target.append(pl); 194 181 195 } else { 182 target.empty();196 pl.empty(); 183 197 } 184 198 });
Note: See TracChangeset
for help on using the changeset viewer.