init repo
This commit is contained in:
75
OfficeWeb/apps/common/mobile/lib/component/PlanarSpinner.js
Normal file
75
OfficeWeb/apps/common/mobile/lib/component/PlanarSpinner.js
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
Ext.define("Common.component.PlanarSpinner", {
|
||||
extend: "Ext.field.Spinner",
|
||||
xtype: "planarspinnerfield",
|
||||
config: {},
|
||||
constructor: function () {
|
||||
var me = this;
|
||||
me.callParent(arguments);
|
||||
me.addCls("planar-spinner");
|
||||
},
|
||||
updateComponent: function (newComponent) {
|
||||
this.callParent(arguments);
|
||||
var innerElement = this.innerElement,
|
||||
cls = this.getCls();
|
||||
if (newComponent) {
|
||||
this.spinDownButton = Ext.widget("button", {
|
||||
cls: "x-button x-button-base " + cls + "-button " + cls + "-button-down",
|
||||
iconCls: "spinner-down"
|
||||
});
|
||||
this.spinUpButton = Ext.widget("button", {
|
||||
cls: "x-button x-button-base " + cls + "-button " + cls + "-button-up",
|
||||
iconCls: "spinner-up"
|
||||
});
|
||||
this.downRepeater = this.createRepeater(this.spinDownButton.element, this.onSpinDown);
|
||||
this.upRepeater = this.createRepeater(this.spinUpButton.element, this.onSpinUp);
|
||||
}
|
||||
},
|
||||
updateGroupButtons: function (newGroupButtons, oldGroupButtons) {
|
||||
var me = this,
|
||||
innerElement = me.innerElement,
|
||||
cls = me.getBaseCls() + "-grouped-buttons";
|
||||
me.getComponent();
|
||||
if (newGroupButtons != oldGroupButtons) {
|
||||
if (newGroupButtons) {
|
||||
this.addCls(cls);
|
||||
innerElement.insertFirst(me.spinDownButton.element);
|
||||
innerElement.appendChild(me.spinUpButton.element);
|
||||
} else {
|
||||
this.removeCls(cls);
|
||||
innerElement.insertFirst(me.spinDownButton.element);
|
||||
innerElement.appendChild(me.spinUpButton.element);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
Ext.define("Common.component.RepeatableButton", {
|
||||
extend: "Ext.Button",
|
||||
xtype: "repeatablebutton",
|
||||
requires: ["Ext.util.TapRepeater"],
|
||||
initialize: function () {
|
||||
this.callParent(arguments);
|
||||
this.repeater = this.createRepeater(this.element, this.onRepeatTap);
|
||||
},
|
||||
destroy: function () {
|
||||
var me = this;
|
||||
Ext.destroy(me.repeater);
|
||||
me.callParent(arguments);
|
||||
},
|
||||
createRepeater: function (el, fn) {
|
||||
var me = this,
|
||||
repeater = Ext.create("Ext.util.TapRepeater", {
|
||||
el: el,
|
||||
accelerate: true,
|
||||
delay: 500
|
||||
});
|
||||
repeater.on({
|
||||
tap: fn,
|
||||
touchstart: "onTouchStart",
|
||||
touchend: "onTouchEnd",
|
||||
scope: me
|
||||
});
|
||||
return repeater;
|
||||
},
|
||||
onRepeatTap: function (e) {
|
||||
this.fireAction("tap", [this, e, true], "doTap");
|
||||
},
|
||||
doTap: function (me, e, handle) {
|
||||
if (Ext.isBoolean(handle) && handle) {
|
||||
this.callParent(arguments);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
onTouchStart: function (repeater) {
|
||||
if (!this.getDisabled()) {
|
||||
this.element.addCls(Ext.baseCSSPrefix + "button-pressing");
|
||||
}
|
||||
},
|
||||
onTouchEnd: function (repeater) {
|
||||
this.element.removeCls(Ext.baseCSSPrefix + "button-pressing");
|
||||
}
|
||||
});
|
||||
75
OfficeWeb/apps/common/mobile/lib/component/SettingsList.js
Normal file
75
OfficeWeb/apps/common/mobile/lib/component/SettingsList.js
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
Ext.define("Common.component.SettingsList", {
|
||||
extend: "Ext.List",
|
||||
alias: "widget.settingslist",
|
||||
config: {
|
||||
disableSelection: true,
|
||||
pinHeaders: false,
|
||||
grouped: true,
|
||||
cls: "settings",
|
||||
ui: "round",
|
||||
itemTpl: Ext.create("Ext.XTemplate", '<tpl for=".">', '<tpl if="this.hasIcon(icon)">', '<span class="list-icon {icon}"></span>', "</tpl>", '<tpl if="this.hasIcon(icon)">', '<strong class="icon-offset">{setting}</strong>', "<tpl else>", "<strong>{setting}</strong>", "</tpl>", '<tpl if="this.hasChild(child)">', '<span class="list-icon disclosure"></span>', "</tpl>", "</tpl>", {
|
||||
hasIcon: function (icon) {
|
||||
return !Ext.isEmpty(icon);
|
||||
},
|
||||
hasChild: function (child) {
|
||||
return !Ext.isEmpty(child);
|
||||
}
|
||||
})
|
||||
},
|
||||
findGroupHeaderIndices: function () {
|
||||
var me = this,
|
||||
store = me.getStore(),
|
||||
storeLn = store.getCount(),
|
||||
groups = store.getGroups(),
|
||||
groupLn = groups.length,
|
||||
headerIndices = me.headerIndices = {},
|
||||
footerIndices = me.footerIndices = {},
|
||||
i,
|
||||
previousIndex,
|
||||
firstGroupedRecord,
|
||||
storeIndex;
|
||||
me.groups = groups;
|
||||
for (i = 0; i < groupLn; i++) {
|
||||
firstGroupedRecord = groups[i].children[0];
|
||||
storeIndex = store.indexOf(firstGroupedRecord);
|
||||
headerIndices[storeIndex] = true;
|
||||
previousIndex = storeIndex - 1;
|
||||
if (previousIndex >= 0) {
|
||||
footerIndices[previousIndex] = true;
|
||||
}
|
||||
}
|
||||
footerIndices[storeLn - 1] = true;
|
||||
return headerIndices;
|
||||
}
|
||||
});
|
||||
168
OfficeWeb/apps/common/mobile/lib/component/slider/Vertical.js
Normal file
168
OfficeWeb/apps/common/mobile/lib/component/slider/Vertical.js
Normal file
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
Ext.define("Common.component.slider.Vertical", {
|
||||
extend: "Ext.slider.Slider",
|
||||
xtype: "verticalslider",
|
||||
config: {
|
||||
baseCls: "x-slider-vertical",
|
||||
thumbConfig: {
|
||||
draggable: {
|
||||
direction: "vertical"
|
||||
}
|
||||
}
|
||||
},
|
||||
refreshOffsetValueRatio: function () {
|
||||
var valueRange = this.getMaxValue() - this.getMinValue(),
|
||||
trackHeight = this.elementHeight - this.thumbHeight;
|
||||
this.offsetValueRatio = trackHeight / valueRange;
|
||||
},
|
||||
refreshElementHeight: function () {
|
||||
this.elementHeight = this.element.dom.offsetHeight;
|
||||
var thumb = this.getThumb(0);
|
||||
if (thumb) {
|
||||
this.thumbHeight = thumb.getElementWidth();
|
||||
}
|
||||
},
|
||||
refresh: function () {
|
||||
this.refreshElementHeight();
|
||||
this.refreshValue();
|
||||
},
|
||||
onThumbDragStart: function (thumb, e) {
|
||||
if (e.absDeltaY <= e.absDeltaX) {
|
||||
return false;
|
||||
} else {
|
||||
e.stopPropagation();
|
||||
}
|
||||
if (this.getAllowThumbsOverlapping()) {
|
||||
this.setActiveThumb(thumb);
|
||||
}
|
||||
this.dragStartValue = this.getValue()[this.getThumbIndex(thumb)];
|
||||
this.fireEvent("dragstart", this, thumb, this.dragStartValue, e);
|
||||
},
|
||||
onThumbDrag: function (thumb, e, offsetX, offsetY) {
|
||||
var index = this.getThumbIndex(thumb),
|
||||
offsetValueRatio = this.offsetValueRatio,
|
||||
constrainedValue = this.constrainValue(offsetY / offsetValueRatio);
|
||||
e.stopPropagation();
|
||||
this.setIndexValue(index, constrainedValue);
|
||||
this.fireEvent("drag", this, thumb, this.getValue(), e);
|
||||
return false;
|
||||
},
|
||||
setIndexValue: function (index, value, animation) {
|
||||
var thumb = this.getThumb(index),
|
||||
values = this.getValue(),
|
||||
offsetValueRatio = this.offsetValueRatio,
|
||||
draggable = thumb.getDraggable();
|
||||
draggable.setOffset(null, value * offsetValueRatio, animation);
|
||||
values[index] = this.constrainValue(draggable.getOffset().y / offsetValueRatio);
|
||||
},
|
||||
updateValue: function (newValue, oldValue) {
|
||||
var thumbs = this.getThumbs(),
|
||||
ln = newValue.length,
|
||||
i;
|
||||
this.setThumbsCount(ln);
|
||||
for (i = 0; i < ln; i++) {
|
||||
thumbs[i].getDraggable().setExtraConstraint(null).setOffset(0, newValue[i] * this.offsetValueRatio);
|
||||
}
|
||||
for (i = 0; i < ln; i++) {
|
||||
this.refreshThumbConstraints(thumbs[i]);
|
||||
}
|
||||
},
|
||||
refreshThumbConstraints: function (thumb) {
|
||||
var allowThumbsOverlapping = this.getAllowThumbsOverlapping(),
|
||||
offsetY = thumb.getDraggable().getOffset().y,
|
||||
thumbs = this.getThumbs(),
|
||||
index = this.getThumbIndex(thumb),
|
||||
previousThumb = thumbs[index - 1],
|
||||
nextThumb = thumbs[index + 1],
|
||||
thumbHeight = this.thumbHeight;
|
||||
if (previousThumb) {
|
||||
previousThumb.getDraggable().addExtraConstraint({
|
||||
max: {
|
||||
y: offsetY - ((allowThumbsOverlapping) ? 0 : thumbHeight)
|
||||
}
|
||||
});
|
||||
}
|
||||
if (nextThumb) {
|
||||
nextThumb.getDraggable().addExtraConstraint({
|
||||
min: {
|
||||
y: offsetY + ((allowThumbsOverlapping) ? 0 : thumbHeight)
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onTap: function (e) {
|
||||
if (this.isDisabled()) {
|
||||
return;
|
||||
}
|
||||
var targetElement = Ext.get(e.target);
|
||||
if (!targetElement || targetElement.hasCls("x-thumb")) {
|
||||
return;
|
||||
}
|
||||
var touchPointY = e.touch.point.y,
|
||||
element = this.element,
|
||||
elementY = element.getY(),
|
||||
offset = touchPointY - elementY - (this.thumbHeight / 2),
|
||||
value = this.constrainValue(offset / this.offsetValueRatio),
|
||||
values = this.getValue(),
|
||||
minDistance = Infinity,
|
||||
ln = values.length,
|
||||
i,
|
||||
absDistance,
|
||||
testValue,
|
||||
closestIndex,
|
||||
oldValue,
|
||||
thumb;
|
||||
if (ln === 1) {
|
||||
closestIndex = 0;
|
||||
} else {
|
||||
for (i = 0; i < ln; i++) {
|
||||
testValue = values[i];
|
||||
absDistance = Math.abs(testValue - value);
|
||||
if (absDistance < minDistance) {
|
||||
minDistance = absDistance;
|
||||
closestIndex = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
oldValue = values[closestIndex];
|
||||
thumb = this.getThumb(closestIndex);
|
||||
this.setIndexValue(closestIndex, value, this.getAnimation());
|
||||
this.refreshThumbConstraints(thumb);
|
||||
if (oldValue !== value) {
|
||||
this.fireEvent("change", this, thumb, value, oldValue);
|
||||
}
|
||||
}
|
||||
},
|
||||
function () {
|
||||
Ext.deprecateProperty(this, "animationDuration", null, "Ext.slider.Slider.animationDuration has been removed");
|
||||
});
|
||||
88
OfficeWeb/apps/common/mobile/lib/controller/PopClip.js
Normal file
88
OfficeWeb/apps/common/mobile/lib/controller/PopClip.js
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
Ext.define("Common.controller.PopClip", {
|
||||
extend: "Ext.app.Controller",
|
||||
config: {
|
||||
refs: {
|
||||
popClip: "popclip",
|
||||
cutButton: "#id-btn-popclip-cut",
|
||||
copyButton: "#id-btn-popclip-copy",
|
||||
pasteButton: "#id-btn-popclip-paste"
|
||||
},
|
||||
control: {
|
||||
cutButton: {
|
||||
tap: "onTapCutButton"
|
||||
},
|
||||
copyButton: {
|
||||
tap: "onTapCopyButton"
|
||||
},
|
||||
pasteButton: {
|
||||
tap: "onTapPasteButton"
|
||||
}
|
||||
}
|
||||
},
|
||||
init: function () {},
|
||||
launch: function () {},
|
||||
setApi: function (o) {
|
||||
this.api = o;
|
||||
},
|
||||
setMode: function (mode) {
|
||||
var cutButton = this.getCutButton(),
|
||||
copyButton = this.getCopyButton(),
|
||||
pasteButton = this.getPasteButton(),
|
||||
popclip = this.getPopClip();
|
||||
if (mode === "view") {
|
||||
cutButton && cutButton.hide();
|
||||
pasteButton && pasteButton.hide();
|
||||
popclip && popclip.hide();
|
||||
} else {
|
||||
cutButton && cutButton.show();
|
||||
pasteButton && pasteButton.show();
|
||||
popclip && popclip.hide();
|
||||
}
|
||||
},
|
||||
onTapCutButton: function () {
|
||||
this.api && this.api.Cut();
|
||||
var popclip = this.getPopClip();
|
||||
popclip && popclip.hide();
|
||||
},
|
||||
onTapCopyButton: function () {
|
||||
this.api && this.api.Copy();
|
||||
var popclip = this.getPopClip();
|
||||
popclip && popclip.hide();
|
||||
},
|
||||
onTapPasteButton: function () {
|
||||
this.api && this.api.Paste();
|
||||
var popclip = this.getPopClip();
|
||||
popclip && popclip.hide();
|
||||
}
|
||||
});
|
||||
37
OfficeWeb/apps/common/mobile/lib/model/SettingItem.js
Normal file
37
OfficeWeb/apps/common/mobile/lib/model/SettingItem.js
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
Ext.define("Common.model.SettingItem", {
|
||||
extend: "Ext.data.Model",
|
||||
config: {
|
||||
fields: ["id", "setting", "icon", "child", "group"]
|
||||
}
|
||||
});
|
||||
45
OfficeWeb/apps/common/mobile/lib/store/SettingsList.js
Normal file
45
OfficeWeb/apps/common/mobile/lib/store/SettingsList.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
Ext.define("Common.store.SettingsList", {
|
||||
extend: "Ext.data.Store",
|
||||
config: {
|
||||
model: "Common.model.SettingItem",
|
||||
grouper: {
|
||||
groupFn: function (record) {
|
||||
return record.get("group");
|
||||
},
|
||||
sorterFn: function () {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
119
OfficeWeb/apps/common/mobile/lib/view/PopClip.js
Normal file
119
OfficeWeb/apps/common/mobile/lib/view/PopClip.js
Normal file
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
Ext.define("Common.view.PopClip", {
|
||||
extend: "Ext.Container",
|
||||
alias: "widget.popclip",
|
||||
requires: (["Ext.Panel", "Ext.SegmentedButton"]),
|
||||
config: {
|
||||
style: "position: absolute; z-index: 9090; background-color: transparent; width: 2px; height: 2px;"
|
||||
},
|
||||
initialize: function () {
|
||||
var me = this;
|
||||
me.popClipCmp = me.add({
|
||||
xtype: "panel",
|
||||
layout: "fit",
|
||||
ui: "settings",
|
||||
style: "padding: 1px;",
|
||||
hidden: true,
|
||||
items: [{
|
||||
xtype: "container",
|
||||
items: [{
|
||||
xtype: "segmentedbutton",
|
||||
style: "margin: 0",
|
||||
ui: "base",
|
||||
allowToggle: false,
|
||||
items: [{
|
||||
id: "id-btn-popclip-cut",
|
||||
ui: "base",
|
||||
style: "font-size: 0.7em; border: 0; box-shadow: none;",
|
||||
cls: "text-offset-12",
|
||||
text: this.cutButtonText
|
||||
},
|
||||
{
|
||||
id: "id-btn-popclip-copy",
|
||||
ui: "base",
|
||||
style: "font-size: 0.7em; border: 0; box-shadow: none;",
|
||||
cls: "text-offset-12",
|
||||
text: this.copyButtonText
|
||||
},
|
||||
{
|
||||
id: "id-btn-popclip-paste",
|
||||
ui: "base",
|
||||
style: "font-size: 0.7em; border: 0; box-shadow: none;",
|
||||
cls: "text-offset-12",
|
||||
text: this.pasteButtonText
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
});
|
||||
this.callParent(arguments);
|
||||
},
|
||||
show: function (animation) {
|
||||
if (Ext.isDefined(this.isAnim)) {
|
||||
return;
|
||||
}
|
||||
this.callParent(arguments);
|
||||
var popClip = this.popClipCmp;
|
||||
popClip.showBy(this, "bc-tc?");
|
||||
popClip.hide();
|
||||
popClip.show();
|
||||
popClip.alignTo(this, "bc-tc?");
|
||||
this.isAnim = true;
|
||||
Ext.Anim.run(popClip, "pop", {
|
||||
out: false,
|
||||
duration: 250,
|
||||
easing: "ease-out",
|
||||
autoClear: false
|
||||
});
|
||||
popClip.element.on("transitionend", function () {
|
||||
Ext.isDefined(this.isAnim) && delete this.isAnim;
|
||||
},
|
||||
this, {
|
||||
single: true
|
||||
});
|
||||
},
|
||||
hide: function (animation) {
|
||||
var me = this;
|
||||
var safeHide = function (arguments) {
|
||||
if (Ext.isDefined(me.isAnim)) {
|
||||
Ext.defer(safeHide, 50, me, arguments);
|
||||
} else {
|
||||
Ext.bind(me.callParent, me, arguments);
|
||||
me.popClipCmp.hide();
|
||||
}
|
||||
};
|
||||
safeHide(arguments);
|
||||
},
|
||||
cutButtonText: "Cut",
|
||||
copyButtonText: "Copy",
|
||||
pasteButtonText: "Paste"
|
||||
});
|
||||
48
OfficeWeb/apps/common/mobile/lib/view/PopoverPanel.js
Normal file
48
OfficeWeb/apps/common/mobile/lib/view/PopoverPanel.js
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
Ext.define("Common.view.PopoverPanel", {
|
||||
extend: "Ext.Panel",
|
||||
alias: "widget.commonpopoverpanel",
|
||||
config: {
|
||||
showAnimation: {
|
||||
type: "fadeIn",
|
||||
duration: 100
|
||||
},
|
||||
hideAnimation: {
|
||||
type: "fadeOut",
|
||||
duration: 100
|
||||
},
|
||||
modal: {
|
||||
cls: "transparent"
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user