File tree Expand file tree Collapse file tree 11 files changed +22
-11
lines changed Expand file tree Collapse file tree 11 files changed +22
-11
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ JSONEditor.defaults.editors.array = JSONEditor.AbstractEditor.extend({
4646 this . _super ( ) ;
4747 }
4848 } ,
49- disable : function ( ) {
49+ disable : function ( always_disabled ) {
50+ if ( always_disabled ) this . always_disabled = true ;
5051 if ( this . add_row_button ) this . add_row_button . disabled = true ;
5152 if ( this . remove_all_rows_button ) this . remove_all_rows_button . disabled = true ;
5253 if ( this . delete_last_row_button ) this . delete_last_row_button . disabled = true ;
Original file line number Diff line number Diff line change @@ -72,7 +72,8 @@ JSONEditor.defaults.editors.base64 = JSONEditor.AbstractEditor.extend({
7272 this . _super ( ) ;
7373 }
7474 } ,
75- disable : function ( ) {
75+ disable : function ( always_disabled ) {
76+ if ( always_disabled ) this . always_disabled = true ;
7677 if ( this . uploader ) this . uploader . disabled = true ;
7778 this . _super ( ) ;
7879 } ,
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ JSONEditor.defaults.editors.checkbox = JSONEditor.AbstractEditor.extend({
4848 this . _super ( ) ;
4949 }
5050 } ,
51- disable : function ( ) {
51+ disable : function ( always_disabled ) {
52+ if ( always_disabled ) this . always_disabled = true ;
5253 this . input . disabled = true ;
5354 this . _super ( ) ;
5455 } ,
Original file line number Diff line number Diff line change @@ -67,7 +67,8 @@ JSONEditor.defaults.editors["enum"] = JSONEditor.AbstractEditor.extend({
6767 this . _super ( ) ;
6868 }
6969 } ,
70- disable : function ( ) {
70+ disable : function ( always_disabled ) {
71+ if ( always_disabled ) this . always_disabled = true ;
7172 this . switcher . disabled = true ;
7273 this . _super ( ) ;
7374 } ,
Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ JSONEditor.defaults.editors.multiple = JSONEditor.AbstractEditor.extend({
3535 this . _super ( ) ;
3636 }
3737 } ,
38- disable : function ( ) {
38+ disable : function ( always_disabled ) {
39+ if ( always_disabled ) this . always_disabled = true ;
3940 if ( this . editors ) {
4041 for ( var i = 0 ; i < this . editors . length ; i ++ ) {
4142 if ( ! this . editors [ i ] ) continue ;
Original file line number Diff line number Diff line change @@ -179,7 +179,8 @@ JSONEditor.defaults.editors.multiselect = JSONEditor.AbstractEditor.extend({
179179 this . _super ( ) ;
180180 }
181181 } ,
182- disable : function ( ) {
182+ disable : function ( always_disabled ) {
183+ if ( always_disabled ) this . always_disabled = true ;
183184 if ( this . input ) {
184185 this . input . disabled = true ;
185186 }
Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({
4040 }
4141 }
4242 } ,
43- disable : function ( ) {
43+ disable : function ( always_disabled ) {
44+ if ( always_disabled ) this . always_disabled = true ;
4445 if ( this . editjson_button ) this . editjson_button . disabled = true ;
4546 if ( this . addproperty_button ) this . addproperty_button . disabled = true ;
4647 this . hideEditJSON ( ) ;
Original file line number Diff line number Diff line change @@ -336,7 +336,8 @@ JSONEditor.defaults.editors.select = JSONEditor.AbstractEditor.extend({
336336 this . _super ( ) ;
337337 }
338338 } ,
339- disable : function ( ) {
339+ disable : function ( always_disabled ) {
340+ if ( always_disabled ) this . always_disabled = true ;
340341 this . input . disabled = true ;
341342 if ( this . select2 ) this . select2 . select2 ( "enable" , false ) ;
342343 this . _super ( ) ;
Original file line number Diff line number Diff line change @@ -327,7 +327,8 @@ JSONEditor.defaults.editors.selectize = JSONEditor.AbstractEditor.extend({
327327 this . _super ( ) ;
328328 }
329329 } ,
330- disable : function ( ) {
330+ disable : function ( always_disabled ) {
331+ if ( always_disabled ) this . always_disabled = true ;
331332 this . input . disabled = true ;
332333 if ( this . selectize ) {
333334 this . selectize [ 0 ] . selectize . lock ( ) ;
Original file line number Diff line number Diff line change @@ -280,7 +280,8 @@ JSONEditor.defaults.editors.string = JSONEditor.AbstractEditor.extend({
280280 this . _super ( ) ;
281281 }
282282 } ,
283- disable : function ( ) {
283+ disable : function ( always_disabled ) {
284+ if ( always_disabled ) this . always_disabled = true ;
284285 this . input . disabled = true ;
285286 // TODO: WYSIWYG and Markdown editors
286287 this . _super ( ) ;
You can’t perform that action at this time.
0 commit comments