Plugin Directory

Changeset 1531292


Ignore:
Timestamp:
11/09/2016 11:28:58 PM (9 years ago)
Author:
codemacher
Message:

BUFIX: dialog for css_no_break

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cm-css-columns/trunk/admin/js/tinymce-cm-css-columns.js

    r1531289 r1531292  
    113113        tmp.append($('<label for="type">Type</label>'));
    114114        var type = $('<select name="type" id="type"></select>');
     115        type.append($('<option selected disabled>'+$.CssColumns.defaultOptions.css_no_break.type+'</option>'));
     116        type.append($('<option value="auto">auto</option>'));
    115117        type.append($('<option value="avoid">avoid</option>'));
    116         type.append($('<option value="auto">auto</option>'));
    117118        type.append($('<option value="initial">initial</option>'));
    118119        type.append($('<option value="inherit">inherit</option>'));
     
    141142      } else if (shortcode === 'css_no_break') {
    142143        var dialog = that.dialogs['css_no_break'];
    143         result.cols = $('#type', dialog).val();
     144        result.type = $('#type', dialog).val();
    144145        result.tag = $('#tag', dialog).val();
    145146      }
     
    184185       
    185186      } else if (shortcode === 'css_no_break') {
    186         if (options.type !== '' && options.type !== $.CssColumns.defaultOptions.css_no_break.type) {
     187        console.log(options);
     188        if (!$.isEmptyObject(options.type) && options.type !== '' && options.type !== $.CssColumns.defaultOptions.css_no_break.type) {
    187189          scode += ' type=' + options.type;
    188190        }
Note: See TracChangeset for help on using the changeset viewer.