Commit 6f758113 authored by Vincent Bechu's avatar Vincent Bechu Committed by Vincent Bechu

erp5_officejs_application: Presentation OnlyOffice Application

parent 332519cd
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Software Product" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>follow_up/web_site_module/osp-20</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>OSP-20</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>osp-20</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Software Product</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Presentation gadget</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>supervincentb</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>955.29467.6853.44612</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1479822473.11</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>supervincentb</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1479821783.57</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>OfficeJS Spreadsheet Loader Gadget</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="jiodev.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_officejs_onlyoffice_landing.js" type="text/javascript"></script>
</head>
<body>
<script data-renderjs-configuration="portal_type" type="text/x-renderjs-configuration">Presentation</script>
<script data-renderjs-configuration="child-gadget" type="text/x-renderjs-configuration">ooffice/gadget_ooffice.html</script>
</body>
</html>
/*global window, rJS, jIO, URI, location, console, document, RSVP, loopEventListener, navigator, XMLHttpRequest, ProgressEvent*/
/*jslint nomen: true, indent: 2*/
(function (window, rJS, jIO) {
"use strict";
function this_func_link(name) {
return function (opt) {
return this[name].apply(this, opt);
};
}
var gadget_klass = rJS(window),
SCOPE = "main",
SETTING_STORAGE = jIO.createJIO({
type: "indexeddb",
database: "setting"
});
gadget_klass
.ready(function (gadget) {
gadget.props = {};
return gadget.getElement()
.push(function (element) {
var element_list =
element.querySelectorAll("[data-renderjs-configuration]"),
len = element_list.length,
key,
value,
i;
gadget.props.element = element;
gadget.props.configuration = {};
for (i = 0; i < len; i += 1) {
key = element_list[i].getAttribute('data-renderjs-configuration');
value = element_list[i].textContent;
gadget.props.configuration[key] = value;
}
})
.push(function () {
// Resources are now ready
// Modify base to provides same base as gadget
var base = document.createElement('base'),
child_gadget_url = gadget.props.configuration["child-gadget"];
base.href = new URI(child_gadget_url + '/../').normalize()
.toString();
document.head.appendChild(base);
return gadget.declareGadget(
child_gadget_url,
{
scope: SCOPE
}
);
})
.push(function (child_gadget) {
return child_gadget.getElement();
})
.push(function (child_element) {
gadget.props.element.appendChild(child_element);
});
})
.declareMethod('getSetting', function (key, default_value) {
var from_html = this.props.configuration[key];
if (from_html) {
return from_html;
}
return SETTING_STORAGE.get("setting")
.push(function (doc) {
return doc[key] || default_value;
}, function (error) {
if (error.status_code === 404) {
return default_value;
}
throw error;
});
})
.allowPublicAcquisition('getSetting', this_func_link('getSetting'))
.declareMethod('setSetting', function (key, value) {
return SETTING_STORAGE.get("setting")
.push(undefined, function (error) {
if (error.status_code === 404) {
return {};
}
throw error;
})
.push(function (doc) {
doc[key] = value;
return SETTING_STORAGE.put('setting', doc);
});
})
.allowPublicAcquisition('setSetting', this_func_link('setSetting'))
.declareAcquiredMethod("triggerSubmit", "triggerSubmit")
.allowPublicAcquisition('triggerSubmit', this_func_link('triggerMaximize'))
.declareAcquiredMethod("triggerMaximize", "triggerMaximize")
.allowPublicAcquisition('triggerMaximize', this_func_link('triggerMaximize'))
.declareAcquiredMethod("setFillStyle", "setFillStyle")
.allowPublicAcquisition('setFillStyle', this_func_link('setFillStyle'))
.declareMethod('render', function (options) {
var gadget = this;
return RSVP.Queue()
.push(function () {
return gadget.getDeclaredGadget(SCOPE);
})
.push(function (child_gadget) {
return child_gadget.render(options);
});
})
.declareMethod('getContent', function () {
var gadget = this;
return RSVP.Queue()
.push(function () {
return gadget.getDeclaredGadget(SCOPE);
})
.push(function (child_gadget) {
return child_gadget.getContent();
});
});
}(window, rJS, jIO));
\ No newline at end of file
/*global Common*/
/*jslint nomen: true, indent:4*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* 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
*
*/
if (Common === undefined) {
var Common = {};
}
Common.component = Common.component || {};
Common.Analytics = Common.component.Analytics = (function () {
'use strict';
var _category;
return {
initialize: function (id, category) {
if (id === undefined) {
throw 'Analytics: invalid id.';
}
if (category === undefined || Object.prototype.toString.apply(category) !== '[object String]') {
throw 'Analytics: invalid category type.';
}
_category = category;
//$('head').append(
// '<script type="text/javascript">' +
// 'var _gaq = _gaq || [];' +
// '_gaq.push(["_setAccount", "' + id + '"]);' +
// '_gaq.push(["_trackPageview"]);' +
// '(function() {' +
// 'var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true;' +
// 'ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";' +
// 'var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s);' +
// '})();' +
// '</script>'
//);
},
trackEvent: function (action, label, value) {
if (action !== undefined && Object.prototype.toString.apply(action) !== '[object String]') {
throw 'Analytics: invalid action type.';
}
if (label !== undefined && Object.prototype.toString.apply(label) !== '[object String]') {
throw 'Analytics: invalid label type.';
}
if (value !== undefined &&
!(Object.prototype.toString.apply(value) === '[object Number]' && isFinite(value))) {
throw 'Analytics: invalid value type.';
}
if (typeof _gaq === 'undefined') {
return;
}
if (_category === undefined) {
throw 'Analytics is not initialized.';
}
_gaq.push(['_trackEvent', _category, action, label, value]);
}
};
}());
\ No newline at end of file
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* 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
*
*/
if (Common === undefined)
var Common = {};
Common.IrregularStack = function(config) {
var _stack = [];
var _compare = function(obj1, obj2){
if (typeof obj1 === 'object' && typeof obj2 === 'object' && window.JSON)
return window.JSON.stringify(obj1) === window.JSON.stringify(obj2);
return obj1 === obj2;
}
config = config || {};
var _strongCompare = config.strongCompare || _compare;
var _weakCompare = config.weakCompare || _compare;
var _indexOf = function(obj, compare) {
for (var i = _stack.length - 1; i >= 0; i--) {
if (compare(_stack[i], obj))
return i;
}
return -1;
}
var _push = function(obj) {
_stack.push(obj);
}
var _pop = function(obj) {
var index = _indexOf(obj, _strongCompare);
if (index != -1) {
var removed = _stack.splice(index, 1);
return removed[0];
}
return undefined;
}
var _get = function(obj) {
var index = _indexOf(obj, _weakCompare);
if (index != -1)
return _stack[index];
return undefined;
}
var _exist = function(obj) {
return !(_indexOf(obj, _strongCompare) < 0);
}
return {
push: _push,
pop: _pop,
get: _get,
exist: _exist
}
};
\ No newline at end of file
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* 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
*
*/
if (Common === undefined) {
var Common = {};
}
Common.Locale = new(function() {
var l10n = {};
var _createXMLHTTPObject = function() {
var xmlhttp;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (E) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}
return xmlhttp;
};
var _applyLocalization = function() {
try {
for (var prop in l10n) {
var p = prop.split('.');
if (p && p.length > 2) {
var obj = window;
for (var i = 0; i < p.length - 1; ++i) {
if (obj[p[i]] === undefined) {
obj[p[i]] = new Object();
}
obj = obj[p[i]];
}
if (obj) {
obj[p[p.length - 1]] = l10n[prop];
}
}
}
}
catch (e) {
}
};
var _get = function(prop, scope) {
var res = '';
if (scope && scope.name) {
res = l10n[scope.name + '.' + prop];
}
return res || (scope ? eval(scope.name).prototype[prop] : '');
};
var _getUrlParameterByName = function(name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
};
try {
var langParam = _getUrlParameterByName('lang');
var xhrObj = _createXMLHTTPObject();
if (xhrObj && langParam) {
var lang = langParam.split("-")[0];
xhrObj.open('GET', 'locale/' + lang + '.json', false);
xhrObj.send('');
l10n = eval("(" + xhrObj.responseText + ")");
}
}
catch (e) {
}
return {
apply: _applyLocalization,
get: _get
};
})();
\ No newline at end of file
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* 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
*
*/
/**
* ChatMessages.js
*
* Collection
*
* Created by Maxim Kadushkin on 01 March 2014
* Copyright (c) 2014 Ascensio System SIA. All rights reserved.
*
*/
define([
'backbone',
'common/main/lib/model/ChatMessage'
], function(Backbone){
'use strict';
!Common.Collections && (Common.Collections = {});
Common.Collections.ChatMessages = Backbone.Collection.extend({
model: Common.Models.ChatMessage
});
});
\ No newline at end of file
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* 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
*
*/
/**
* Comments.js
*
* Created by Alexey Musinov on 17.01.14
* Copyright (c) 2014 Ascensio System SIA. All rights reserved.
*
*/
if (Common === undefined)
var Common = {};
Common.Collections = Common.Collections || {};
define([
'underscore',
'backbone',
'common/main/lib/model/Comment'
], function(_, Backbone){
'use strict';
Common.Collections.Comments = Backbone.Collection.extend({
model: Common.Models.Comment,
clearEditing: function () {
this.each(function(comment) {
comment.set('editText', false);
comment.set('editTextInPopover', false);
comment.set('showReply', false);
comment.set('showReplyInPopover', false);
comment.set('hideAddReply', false);
});
},
getCommentsReplysCount: function(userid) {
var cnt = 0;
this.each(function(comment) {
if (comment.get('userid')==userid) cnt++;
var rpl = comment.get('replys');
if (rpl && rpl.length>0) {
rpl.forEach(function(reply) {
if (reply.get('userid')==userid) cnt ++;
});
}
});
return cnt;
}
});
});
\ No newline at end of file
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* 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
*
*/
/**
* Fonts.js
*
* Created by Alexander Yuzhin on 2/11/14
* Copyright (c) 2014 Ascensio System SIA. All rights reserved.
*
*/
if (Common === undefined)
var Common = {};
Common.Collections = Common.Collections || {};
define([
'backbone',
'common/main/lib/model/Font'
], function(Backbone){ 'use strict';
Common.Collections.Fonts = Backbone.Collection.extend({
model: Common.Models.Font,
comparator: function(item1, item2) {
var n1 = item1.get('name').toLowerCase(),
n2 = item2.get('name').toLowerCase();
if (n1==n2) return 0;
return (n1<n2) ? -1 : 1;
}
});
});
\ No newline at end of file
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* 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
*
*/
/**
* User: Julia.Radzhabova
* Date: 05.03.15
* Time: 17:05
*/
if (Common === undefined)
var Common = {};
Common.Collections = Common.Collections || {};
define([
'underscore',
'backbone',
'common/main/lib/model/HistoryVersion'
], function(_, Backbone){
'use strict';
Common.Collections.HistoryVersions = Backbone.Collection.extend({
model: Common.Models.HistoryVersion,
findRevision: function(revision) {
return this.findWhere({revision: revision});
},
findRevisions: function(revision) {
return this.where({revision: revision});
}
});
});
\ No newline at end of file
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* 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
*
*/
/**
* User: Julia.Radzhabova
* Date: 17.05.16
* Time: 15:54
*/
if (Common === undefined)
var Common = {};
Common.Collections = Common.Collections || {};
define([
'underscore',
'backbone',
'common/main/lib/model/Plugin'
], function(_, Backbone){
'use strict';
Common.Collections.Plugins = Backbone.Collection.extend({
model: Common.Models.Plugin
});
});
\ No newline at end of file
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* 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
*
*/
/**
* ReviewChanges.js
*
* Created by Julia.Radzhabova on 05.08.15
* Copyright (c) 2014 Ascensio System SIA. All rights reserved.
*
*/
if (Common === undefined)
var Common = {};
Common.Collections = Common.Collections || {};
define([
'underscore',
'backbone',
'common/main/lib/model/ReviewChange'
], function(_, Backbone){
'use strict';
Common.Collections.ReviewChanges = Backbone.Collection.extend({
model: Common.Models.ReviewChange
});
});
\ No newline at end of file
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* 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
*
*/
/**
* Created by Julia.Radzhabova on 09.07.15
* Copyright (c) 2014 Ascensio System SIA. All rights reserved.
*/
if (Common === undefined)
var Common = {};
Common.Collections = Common.Collections || {};
define([
'backbone'
], function(Backbone){
'use strict';
Common.Collections.TextArt = Backbone.Collection.extend({
model: Backbone.Model.extend({
defaults: function() {
return {
id: Common.UI.getId(),
imageUrl: null,
data: null
}
}
})
});
});
\ No newline at end of file
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* 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
*
*/
if (Common === undefined)
var Common = {};
define([
'common/main/lib/component/Button'
], function () {
'use strict';
Common.UI.ColorButton = Common.UI.Button.extend({
options : {
hint: false,
enableToggle: false
},
template: _.template([
'<div class="btn-group" id="<%= id %>">',
'<button type="button" class="btn btn-color dropdown-toggle <%= cls %>" data-toggle="dropdown" style="<%= style %>">',
'<span>&nbsp;</span>',
'</button>',
'</div>'
].join('')),
setColor: function(color) {
var border_color, clr,
span = $(this.cmpEl).find('button span');
this.color = color;
if ( color== 'transparent' ) {
border_color = '#BEBEBE';
clr = color;
span.addClass('color-transparent');
} else {
border_color = 'transparent';
clr = (typeof(color) == 'object') ? '#'+color.color : '#'+color;
span.removeClass('color-transparent');
}
span.css({'background-color': clr, 'border-color': border_color});
}
});
});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment