Changeset 371
- Timestamp:
- Apr 22, 2010, 11:13:12 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web-app/js/SelectAddMore.js
r365 r371 66 66 67 67 // find all matching select elements 68 $("select[rel*='" + th is.options.rel + "']").each(function() {68 $("select[rel*='" + that.options.rel + "']").each(function() { 69 69 // add the magic option 70 that.add TermEditorOption(this);70 that.addOpenDialogOption(this); 71 71 }); 72 72 }, … … 75 75 * extend the select element 76 76 */ 77 addTermEditorOption: function(element) { 78 var that = this; 79 var e = $(element); 80 var s = e.children().size(); 77 addOpenDialogOption: function(element) { 78 var that = this; 79 var e = $(element); 80 var s = e.children().size(); 81 var class = that.options.class; 82 var label = that.options.label; 83 var vars = that.options.vars; 84 var url = that.options.url; 85 var width = that.options.width; 86 var height = that.options.height; 87 var onClose = that.options.onClose; 81 88 82 89 // add a magic option to the end of the select element 83 e.append('<option value="" class="' + this.options.class + '">' + this.options.label + '</option>');90 e.append('<option value="" class="' + class + '">' + label + '</option>'); 84 91 85 92 // and bind and onChange event … … 91 98 // the dialog integrate with the application! 92 99 // @see http://www.w3schools.com/html5/tag_iframe.asp 93 $('<iframe src="' + that.options.url + '?' + that.options.vars + '=' + e.attr(that.options.vars) + '" sanbox="allow-same-origin" seamless />').dialog({94 title : that.options.label,100 $('<iframe src="' + url + '?' + vars + '=' + e.attr(vars) + '" sanbox="allow-same-origin" seamless />').dialog({ 101 title : label, 95 102 autoOpen: true, 96 width : that.options.width,97 height : that.options.height,98 modal : true,99 close : function() {100 that.options.onClose(this);103 width : width, 104 height : height, 105 modal : true, 106 close : function() { 107 onClose(this); 101 108 } 102 }).width( that.options.width - 10).height(that.options.height)109 }).width(width - 10).height(height) 103 110 } 104 111 })
Note: See TracChangeset
for help on using the changeset viewer.