diff --git a/apps/documenteditor/mobile/app/controller/edit/EditChart.js b/apps/documenteditor/mobile/app/controller/edit/EditChart.js index 169fec768..43220faa9 100644 --- a/apps/documenteditor/mobile/app/controller/edit/EditChart.js +++ b/apps/documenteditor/mobile/app/controller/edit/EditChart.js @@ -150,8 +150,8 @@ define([ $('.chart-replace li').single('click', _.buffered(me.onReplace, 100, me)); $('.chart-wrap .chart-wrap-types li').single('click', _.buffered(me.onWrapType, 100, me)); $('.chart-wrap .align a').single('click', _.bind(me.onAlign, me)); - $('#edit-chart-movetext input').single('click', _.bind(me.onMoveText, me)); - $('#edit-chart-overlap input').single('click', _.bind(me.onOverlap, me)); + $('#edit-chart-movetext input').single('change', _.bind(me.onMoveText, me)); + $('#edit-chart-overlap input').single('change', _.bind(me.onOverlap, me)); $('.chart-wrap .distance input').single('change touchend', _.buffered(me.onWrapDistance, 100, me)); $('.chart-wrap .distance input').single('input', _.bind(me.onWrapDistanceChanging, me)); diff --git a/apps/documenteditor/mobile/app/controller/edit/EditImage.js b/apps/documenteditor/mobile/app/controller/edit/EditImage.js index 3f33ef5b4..feef5fbef 100644 --- a/apps/documenteditor/mobile/app/controller/edit/EditImage.js +++ b/apps/documenteditor/mobile/app/controller/edit/EditImage.js @@ -42,8 +42,11 @@ define([ 'core', - 'documenteditor/mobile/app/view/edit/EditImage' -], function (core) { + 'documenteditor/mobile/app/view/edit/EditImage', + 'jquery', + 'underscore', + 'backbone' +], function (core, view, $, _, Backbone) { 'use strict'; DE.Controllers.EditImage = Backbone.Controller.extend(_.extend((function() { @@ -123,8 +126,8 @@ define([ $('.image-wrap .image-wrap-types li').single('click', _.buffered(me.onWrapType, 100, me)); $('.image-wrap .align a').single('click', _.bind(me.onAlign, me)); - $('#edit-image-movetext input').single('click', _.bind(me.onMoveText, me)); - $('#edit-image-overlap input').single('click', _.bind(me.onOverlap, me)); + $('#edit-image-movetext input').single('change', _.bind(me.onMoveText, me)); + $('#edit-image-overlap input').single('change', _.bind(me.onOverlap, me)); $('.image-wrap .distance input').single('change touchend', _.buffered(me.onWrapDistance, 100, me)); $('.image-wrap .distance input').single('input', _.bind(me.onWrapDistanceChanging, me)); diff --git a/apps/documenteditor/mobile/app/controller/edit/EditParagraph.js b/apps/documenteditor/mobile/app/controller/edit/EditParagraph.js index e4690165f..21ac45887 100644 --- a/apps/documenteditor/mobile/app/controller/edit/EditParagraph.js +++ b/apps/documenteditor/mobile/app/controller/edit/EditParagraph.js @@ -42,8 +42,11 @@ define([ 'core', - 'documenteditor/mobile/app/view/edit/EditParagraph' -], function (core) { + 'documenteditor/mobile/app/view/edit/EditParagraph', + 'jquery', + 'underscore', + 'backbone' +], function (core, view, $, _, Backbone) { 'use strict'; DE.Controllers.EditParagraph = Backbone.Controller.extend(_.extend((function() { @@ -107,15 +110,15 @@ define([ var me = this, paletteBackgroundColor = me.getView('EditParagraph').paletteBackgroundColor; - $('#paragraph-distance-before .button').single('click', _.bind(me.onDistanceBefore, me)); - $('#paragraph-distance-after .button').single('click', _.bind(me.onDistanceAfter, me)); - $('#paragraph-space input:checkbox').single('click', _.bind(me.onSpaceBetween, me)); - $('#paragraph-page-break input:checkbox').single('click', _.bind(me.onBreakBefore, me)); - $('#paragraph-page-orphan input:checkbox').single('click', _.bind(me.onOrphan, me)); - $('#paragraph-page-keeptogether input:checkbox').single('click',_.bind(me.onKeepTogether, me)); - $('#paragraph-page-keepnext input:checkbox').single('click', _.bind(me.onKeepNext, me)); + $('#paragraph-distance-before .button').single('click', _.bind(me.onDistanceBefore, me)); + $('#paragraph-distance-after .button').single('click', _.bind(me.onDistanceAfter, me)); + $('#paragraph-space input:checkbox').single('change', _.bind(me.onSpaceBetween, me)); + $('#paragraph-page-break input:checkbox').single('change', _.bind(me.onBreakBefore, me)); + $('#paragraph-page-orphan input:checkbox').single('change', _.bind(me.onOrphan, me)); + $('#paragraph-page-keeptogether input:checkbox').single('change',_.bind(me.onKeepTogether, me)); + $('#paragraph-page-keepnext input:checkbox').single('change', _.bind(me.onKeepNext, me)); - paletteBackgroundColor && paletteBackgroundColor.on('select', _.bind(me.onBackgroundColor, me)); + paletteBackgroundColor && paletteBackgroundColor.on('select', _.bind(me.onBackgroundColor, me)); me.initSettings(); }, diff --git a/apps/documenteditor/mobile/app/controller/edit/EditShape.js b/apps/documenteditor/mobile/app/controller/edit/EditShape.js index d69059dbf..a54418f5d 100644 --- a/apps/documenteditor/mobile/app/controller/edit/EditShape.js +++ b/apps/documenteditor/mobile/app/controller/edit/EditShape.js @@ -42,8 +42,11 @@ define([ 'core', - 'documenteditor/mobile/app/view/edit/EditShape' -], function (core) { + 'documenteditor/mobile/app/view/edit/EditShape', + 'jquery', + 'underscore', + 'backbone' +], function (core, view, $, _, Backbone) { 'use strict'; DE.Controllers.EditShape = Backbone.Controller.extend(_.extend((function() { @@ -145,8 +148,8 @@ define([ $('.shape-replace li').single('click', _.buffered(me.onReplace, 100, me)); $('.shape-wrap .shape-wrap-types li').single('click', _.buffered(me.onWrapType, 100, me)); $('.shape-wrap .align a').single('click', _.bind(me.onAlign, me)); - $('#edit-shape-movetext input').single('click', _.bind(me.onMoveText, me)); - $('#edit-shape-overlap input').single('click', _.bind(me.onOverlap, me)); + $('#edit-shape-movetext input').single('change', _.bind(me.onMoveText, me)); + $('#edit-shape-overlap input').single('change', _.bind(me.onOverlap, me)); $('.shape-wrap .distance input').single('change touchend', _.buffered(me.onWrapDistance, 100, me)); $('.shape-wrap .distance input').single('input', _.bind(me.onWrapDistanceChanging, me)); diff --git a/apps/documenteditor/mobile/app/controller/edit/EditTable.js b/apps/documenteditor/mobile/app/controller/edit/EditTable.js index 2960abc68..94caa3da8 100644 --- a/apps/documenteditor/mobile/app/controller/edit/EditTable.js +++ b/apps/documenteditor/mobile/app/controller/edit/EditTable.js @@ -42,8 +42,11 @@ define([ 'core', - 'documenteditor/mobile/app/view/edit/EditTable' -], function (core) { + 'documenteditor/mobile/app/view/edit/EditTable', + 'jquery', + 'underscore', + 'backbone' +], function (core, view, $, _, Backbone) { 'use strict'; DE.Controllers.EditTable = Backbone.Controller.extend(_.extend((function() { @@ -143,34 +146,34 @@ define([ paletteFillColor = me.getView('EditTable').paletteFillColor, paletteBorderColor = me.getView('EditTable').paletteBorderColor; - $('#table-wrap-type li').single('click', _.buffered(me.onWrapType, 100, me)); - $('#table-move-text input').single('click', _.bind(me.onWrapMoveText, me)); - $('#table-distance input').single('change touchend', _.buffered(me.onWrapDistance, 100, me)); - $('#table-distance input').single('input', _.bind(me.onWrapDistanceChanging, me)); - $('#table-align-left').single('click', _.bind(me.onWrapAlign, me, c_tableAlign.TABLE_ALIGN_LEFT)); - $('#table-align-center').single('click', _.bind(me.onWrapAlign, me, c_tableAlign.TABLE_ALIGN_CENTER)); - $('#table-align-right').single('click', _.bind(me.onWrapAlign, me, c_tableAlign.TABLE_ALIGN_RIGHT)); + $('#table-wrap-type li').single('click', _.buffered(me.onWrapType, 100, me)); + $('#table-move-text input:checkbox').single('change', _.bind(me.onWrapMoveText, me)); + $('#table-distance input').single('change touchend', _.buffered(me.onWrapDistance, 100, me)); + $('#table-distance input').single('input', _.bind(me.onWrapDistanceChanging, me)); + $('#table-align-left').single('click', _.bind(me.onWrapAlign, me, c_tableAlign.TABLE_ALIGN_LEFT)); + $('#table-align-center').single('click', _.bind(me.onWrapAlign, me, c_tableAlign.TABLE_ALIGN_CENTER)); + $('#table-align-right').single('click', _.bind(me.onWrapAlign, me, c_tableAlign.TABLE_ALIGN_RIGHT)); - $('#table-option-repeatasheader input').single('click', _.bind(me.onOptionRepeat, me)); - $('#table-option-resizetofit input').single('click', _.bind(me.onOptionResize, me)); - $('#table-options-margins input').single('change touchend', _.buffered(me.onOptionMargin, 100, me)); - $('#table-options-margins input').single('input', _.bind(me.onOptionMarginChanging, me)); + $('#table-option-repeatasheader input:checkbox').single('change', _.bind(me.onOptionRepeat, me)); + $('#table-option-resizetofit input:checkbox').single('change', _.bind(me.onOptionResize, me)); + $('#table-options-margins input').single('change touchend', _.buffered(me.onOptionMargin, 100, me)); + $('#table-options-margins input').single('input', _.bind(me.onOptionMarginChanging, me)); - $('#table-options-header-row input').single('click', _.bind(me.onCheckTemplateChange, me, 0)); - $('#table-options-total-row input').single('click', _.bind(me.onCheckTemplateChange, me, 1)); - $('#table-options-banded-row input').single('click', _.bind(me.onCheckTemplateChange, me, 2)); - $('#table-options-first-column input').single('click', _.bind(me.onCheckTemplateChange, me, 3)); - $('#table-options-last-column input').single('click', _.bind(me.onCheckTemplateChange, me, 4)); - $('#table-options-banded-column input').single('click', _.bind(me.onCheckTemplateChange, me, 5)); + $('#table-options-header-row input:checkbox').single('change', _.bind(me.onCheckTemplateChange, me, 0)); + $('#table-options-total-row input:checkbox').single('change', _.bind(me.onCheckTemplateChange, me, 1)); + $('#table-options-banded-row input:checkbox').single('change', _.bind(me.onCheckTemplateChange, me, 2)); + $('#table-options-first-column input:checkbox').single('change', _.bind(me.onCheckTemplateChange, me, 3)); + $('#table-options-last-column input:checkbox').single('change', _.bind(me.onCheckTemplateChange, me, 4)); + $('#table-options-banded-column input:checkbox').single('change', _.bind(me.onCheckTemplateChange, me, 5)); - $('#edit-table-bordertypes a').single('click', _.bind(me.onBorderTypeClick, me)); + $('#edit-table-bordertypes a').single('click', _.bind(me.onBorderTypeClick, me)); - $('.dataview.table-styles .row div').single('click', _.bind(me.onStyleClick, me)); - $('#edit-table-bordersize input').single('change touchend', _.buffered(me.onBorderSize, 100, me)); - $('#edit-table-bordersize input').single('input', _.bind(me.onBorderSizeChanging, me)); + $('.dataview.table-styles .row div').single('click', _.bind(me.onStyleClick, me)); + $('#edit-table-bordersize input').single('change touchend', _.buffered(me.onBorderSize, 100, me)); + $('#edit-table-bordersize input').single('input', _.bind(me.onBorderSizeChanging, me)); - paletteFillColor && paletteFillColor.on('select', _.bind(me.onFillColor, me)); - paletteBorderColor && paletteBorderColor.on('select', _.bind(me.onBorderColor, me)); + paletteFillColor && paletteFillColor.on('select', _.bind(me.onFillColor, me)); + paletteBorderColor && paletteBorderColor.on('select', _.bind(me.onBorderColor, me)); me.initSettings(pageId); }, diff --git a/apps/documenteditor/mobile/app/view/Settings.js b/apps/documenteditor/mobile/app/view/Settings.js index 40fd8e83b..3e76ca50e 100644 --- a/apps/documenteditor/mobile/app/view/Settings.js +++ b/apps/documenteditor/mobile/app/view/Settings.js @@ -105,7 +105,6 @@ define([ $layour.find('#settings-search .item-title').text(this.textFindAndReplace) } else { $layour.find('#settings-readermode input:checkbox') - .attr('checked', Common.SharedSettings.get('readerMode')) .prop('checked', Common.SharedSettings.get('readerMode')); }