|
113 | 113 | this.namespace.val(localStorage.getItem('namespace') || ""); |
114 | 114 |
|
115 | 115 | // Restrict the input |
116 | | - $('input[data-restrict]').keyup(function(e){ |
| 116 | + $('input:data(restrict)').keyup(function(e){ |
117 | 117 | var input = $(this), |
118 | 118 | restrict = new RegExp("[^" + input.data('restrict') + "]"), |
119 | 119 | value = input.val(), |
|
124 | 124 | input.val(newValue); |
125 | 125 | } |
126 | 126 | }); |
127 | | - |
128 | | - // Hide the unsupported modules for native display |
129 | | - /*var noNative = $('.no-native input'); |
130 | | - var optional = $('.optional input');*/ |
131 | | - |
132 | | - /*this.displays = $(".display:checkbox").change(function(){ |
133 | | -
|
134 | | - // Get the selected displays |
135 | | - var displays = this.getDisplays(); |
136 | | -
|
137 | | - optional.removeAttr('disabled') |
138 | | - .prop('checked', true) |
139 | | - .parent() |
140 | | - .removeClass('disabled'); |
141 | | -
|
142 | | - // Display modules if only the native display is selected |
143 | | - if (displays.length === 1 && $("#native").prop('checked')) |
144 | | - { |
145 | | - noNative.prop('checked', false) |
146 | | - .attr('disabled', true) |
147 | | - .parent() |
148 | | - .addClass('disabled'); |
149 | | - } |
150 | | - else if (displays.length === 0) |
151 | | - { |
152 | | - optional.attr('disabled', true) |
153 | | - .prop('checked', false) |
154 | | - .parent() |
155 | | - .addClass('disabled'); |
156 | | - } |
157 | | - }.bind(this));*/ |
158 | 127 | }; |
159 | 128 |
|
160 | 129 | // Reference to the prototype |
161 | | - var p = NewProject.prototype = Object.create(Module.prototype); |
| 130 | + var p = extend(NewProject, Module); |
162 | 131 |
|
163 | 132 | Object.defineProperty(p, 'enabled', { |
164 | 133 | set : function(enabled) |
|
0 commit comments