diff --git a/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js b/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js index a29208e7f..4a227d02b 100644 --- a/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js +++ b/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js @@ -692,9 +692,6 @@ define([ }); this.btnBorders.menu.on('item:click', _.bind(this.onBordersMenu, this)); this.btnBorders.on('click', _.bind(this.onBorders, this)); - var colorVal = $('
'); - $('button:first-child', this.btnBorders.cmpEl).append(colorVal); - colorVal.css('background-color', this.btnBorders.currentColor || 'transparent'); this.mnuBorderColorPicker = new Common.UI.ThemeColorPalette({ el: $('#format-rules-borders-menu-bordercolor') }); @@ -1161,8 +1158,6 @@ define([ } if (props) { - // var val = props.asc_getLocation(); - // this.txtScope.setValue((val) ? val : ''); if (type == Asc.c_oAscCFType.containsText || type == Asc.c_oAscCFType.notContainsText || type == Asc.c_oAscCFType.beginsWith || type == Asc.c_oAscCFType.endsWith || type == Asc.c_oAscCFType.timePeriod || type == Asc.c_oAscCFType.aboveAverage || type == Asc.c_oAscCFType.top10 || type == Asc.c_oAscCFType.cellIs || type == Asc.c_oAscCFType.expression) { @@ -1470,8 +1465,8 @@ define([ onFormatFillColorSelect: function(picker, color, fromBtn) { var clr = (typeof(color) == 'object') ? color.color : color; - this.mnuFillColorPicker.currentColor = color; - $('.btn-color-value-line', this.mnuFillColorPicker.cmpEl).css('background-color', '#' + clr); + this.btnFillColor.currentColor = color; + $('.btn-color-value-line', this.btnFillColor.cmpEl).css('background-color', '#' + clr); picker.currentColor = color; this.xfsFormat.asc_setFillColor(Common.Utils.ThemeColor.getRgbColor(this.mnuFillColorPicker.currentColor)); diff --git a/apps/spreadsheeteditor/main/app/view/FormatRulesManagerDlg.js b/apps/spreadsheeteditor/main/app/view/FormatRulesManagerDlg.js index 28fa617a0..f4fdb61cb 100644 --- a/apps/spreadsheeteditor/main/app/view/FormatRulesManagerDlg.js +++ b/apps/spreadsheeteditor/main/app/view/FormatRulesManagerDlg.js @@ -58,10 +58,23 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesManagerDlg.templa me.template = me.options.template || me.template; - me.listenTo(me.model, 'change:sort', function() { + me.listenTo(me.model, 'change:name', function() { me.render(); me.trigger('change', me, me.model); }); + me.listenTo(me.model, 'change:tip', function() { + var el = me.$el || $(me.el), + tip = el.data('bs.tooltip'); + if (tip) { + var zIndex = tip.options.zIndex; + el.removeData('bs.tooltip'); + el.tooltip({ + title : me.model.get('tip'), + placement : 'cursor', + zIndex : zIndex + }); + } + }); me.listenTo(me.model, 'change:selected', function() { var el = me.$el || $(me.el); el.toggleClass('selected', me.model.get('selected') && me.model.get('allowSelected')); @@ -107,19 +120,13 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesManagerDlg.templa this.cmbScope = new Common.UI.ComboBox({ el : $('#format-manager-combo-scope'), - menuStyle : 'min-width: 100%;', + menuStyle : 'min-width: 100%;max-height: 211px;', editable : false, cls : 'input-group-nr', - data : [ - { value: Asc.c_oAscSelectionForCFType.selection, displayValue: this.textSelection }, - { value: Asc.c_oAscSelectionForCFType.worksheet, displayValue: this.textThisSheet }, - { value: Asc.c_oAscSelectionForCFType.table, displayValue: this.textThisTable }, - { value: Asc.c_oAscSelectionForCFType.pivot, displayValue: this.textThisPivot } - ] + data : [] }).on('selected', function(combo, record) { - me.refreshRuleList(record.value); + me.refreshRuleList(record); }); - this.cmbScope.setValue(Asc.c_oAscSelectionForCFType.selection); this.rulesList = new Common.UI.ListView({ el: $('#format-manager-rules-list', this.$window), @@ -130,7 +137,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesManagerDlg.templa '