',
- '
',
@@ -138,6 +162,95 @@ define([
var me = this,
$window = this.getChild();
+ this.chFirstPage = new Common.UI.CheckBox({
+ el: $('#id-dlg-hf-ch-first'),
+ labelText: this.textDiffFirst
+ });
+ this.chFirstPage.on('change', _.bind(function(field, newValue, oldValue, eOpts){
+ var checked = (field.getValue()=='checked');
+ // if (this.HFObject)
+ // this.HFObject.setFirst(checked);
+
+ this.btnFirst.setVisible(checked);
+ if (!checked && this.btnFirst.isActive())
+ (this.btnAll.isVisible()) ? this.btnAll.toggle(true) : this.btnOdd.toggle(true);
+
+ this.cmbPresetsF.setDisabled(checked);
+ this.cmbPresetsH.setDisabled(checked);
+ }, this));
+
+ this.chOddPage = new Common.UI.CheckBox({
+ el: $('#id-dlg-hf-ch-odd'),
+ labelText: this.textDiffOdd
+ });
+ this.chOddPage.on('change', _.bind(function(field, newValue, oldValue, eOpts){
+ var checked = (field.getValue()=='checked');
+ // if (this.HFObject)
+ // this.HFObject.setOdd(checked);
+
+ this.btnOdd.setVisible(checked);
+ this.btnEven.setVisible(checked);
+ this.btnAll.setVisible(!checked);
+ if (!checked && (this.btnOdd.isActive() || this.btnEven.isActive()))
+ this.btnAll.toggle(true);
+ if (checked && this.btnAll.isActive())
+ this.btnOdd.toggle(true);
+ this.cmbPresetsF.setDisabled(checked);
+ this.cmbPresetsH.setDisabled(checked);
+ }, this));
+
+ this.chScale = new Common.UI.CheckBox({
+ el: $('#id-dlg-hf-ch-scale'),
+ labelText: this.textScale
+ });
+ this.chScale.on('change', _.bind(function(field, newValue, oldValue, eOpts){
+ var checked = (field.getValue()=='checked');
+ // if (this.HFObject)
+ // this.HFObject.setScale(checked);
+ }, this));
+
+ this.chAlign = new Common.UI.CheckBox({
+ el: $('#id-dlg-hf-ch-align'),
+ labelText: this.textAlign
+ });
+ this.chAlign.on('change', _.bind(function(field, newValue, oldValue, eOpts){
+ var checked = (field.getValue()=='checked');
+ // if (this.HFObject)
+ // this.HFObject.setAlign(checked);
+ }, this));
+
+ this.btnAll = new Common.UI.Button({
+ el: $('#id-dlg-hf-btn-all'),
+ enableToggle: true,
+ toggleGroup: 'hf-pages',
+ allowDepress: false,
+ pressed: true
+ });
+
+ this.btnOdd = new Common.UI.Button({
+ el: $('#id-dlg-hf-btn-odd'),
+ enableToggle: true,
+ toggleGroup: 'hf-pages',
+ allowDepress: false
+ });
+ this.btnOdd.on('click', _.bind(this.onPageTypeClick, this, 0));
+
+ this.btnEven = new Common.UI.Button({
+ el: $('#id-dlg-hf-btn-even'),
+ enableToggle: true,
+ toggleGroup: 'hf-pages',
+ allowDepress: false
+ });
+ this.btnEven.on('click', _.bind(this.onPageTypeClick, this, 1));
+
+ this.btnFirst = new Common.UI.Button({
+ el: $('#id-dlg-hf-btn-first'),
+ enableToggle: true,
+ toggleGroup: 'hf-pages',
+ allowDepress: false
+ });
+ this.btnFirst.on('click', _.bind(this.onPageTypeClick, this, 2));
+
this.cmbPresetsH = new Common.UI.ComboBox({
el : $('#id-dlg-h-presets'),
cls : 'input-group-nr',
@@ -575,6 +688,10 @@ define([
this.HFObject.setTextColor(Common.Utils.ThemeColor.getRgbColor(color));
},
+ onPageTypeClick: function(type, btn, event) {
+
+ },
+
cancelButtonText: 'Cancel',
okButtonText: 'Ok',
tipFontName: 'Font Name',
@@ -601,7 +718,15 @@ define([
textColor: 'Text color',
textNewColor: 'Add New Custom Color',
textInsert: 'Insert',
- textPresets: 'Presets'
+ textPresets: 'Presets',
+ textDiffFirst: 'Different first page',
+ textDiffOdd: 'Different odd and even pages',
+ textScale: 'Scale with document',
+ textAlign: 'Align with page margins',
+ textFirst: 'First page',
+ textOdd: 'Odd page',
+ textEven: 'Even page',
+ textAll: 'All pages'
}, SSE.Views.HeaderFooterDialog || {}))
});
\ No newline at end of file