Commit 3c44af10 authored by Maxim Kadushkin's avatar Maxim Kadushkin

[DE embed] view changed: popovers => modals, action buttons => dropdown

parent aec0a03e
/*
*
* (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
*
*/
!window.utils && (window.utils = {});
utils.modals = new(function() {
var tplDialog = '<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="idm-title" aria-hidden="true">' +
'<div class="modal-dialog" role="document">' +
'<div class="modal-content">' +
'<div class="modal-header">' +
'<button type="button" class="close" data-dismiss="modal" aria-label="Close">' +
'<span aria-hidden="true">&times;</span>' +
'</button>' +
'<h4 id="idm-title" class="modal-title">{title}</h4>'+
'</div>'+
'<div class="modal-body">{body}</div>'+
'<div class="modal-footer">{footer}</div>'+
'</div>' +
'</div>' +
'</div>';
var _tplbody_share = '<div class="share-link">' +
'<input id="id-short-url" class="form-control" type="text" readonly/>' +
'</div>' +
'<div class="share-buttons">' +
'<span class="svg big-facebook" data-name="facebook"></span>' +
'<span class="svg big-twitter" data-name="twitter"></span>' +
'<span class="svg big-gplus" data-name="gplus"></span>' +
'<span class="svg big-email" data-name="email"></span>' +
'</div>';
var _tplbody_embed = '<div class="size-manual">' +
'<span class="caption">Width:</span>' +
'<input id="txt-embed-width" class="form-control input-xs" type="text" value="400px">' +
'<input id="txt-embed-height" class="form-control input-xs right" type="text" value="600px">' +
'<span class="right caption">Height:</span>' +
'</div>' +
'<textarea id="txt-embed-url" rows="4" class="form-control" readonly></textarea>';
return {
create: function(name, parent) {
!parent && (parent = 'body');
var _$dlg;
if (name == 'share') {
_$dlg = $(tplDialog
.replace(/\{title}/, 'Share Link')
.replace(/\{body}/, _tplbody_share)
.replace(/\{footer}/, '<button id="btn-copyshort" type="button" class="btn">Copy to clipboard</button>'))
.appendTo(parent)
.attr('id', 'dlg-share');
} else
if (name == 'embed') {
_$dlg = $(tplDialog
.replace(/\{title}/, 'Embed')
.replace(/\{body}/, _tplbody_embed)
.replace(/\{footer}/, '<button id="btn-copyembed" type="button" class="btn">Copy to clipboard</button>'))
.appendTo(parent)
.attr('id', 'dlg-embed');
}
return _$dlg;
}
};
})();
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="44 0 198 44" style="enable-background:new 0 0 198 44;" xml:space="preserve">
<defs>
<path id="imgtools" class="_st0" d="M46,5v2h18V5H46z M46,12h18v-2H46V12z M46,17h18v-2H46V17z"/>
<path id="imgplus" d="M166,3h-2v7h-7v2h7v7h2v-7h7v-2h-7V3z"/>
<rect id="imgminus" x="179" y="10" width="16" height="2"/>
</defs>
<style type="text/css">
.st0{fill:#010202;}
.st1{fill:#1E1E1C;}
</style>
<g id="XMLID_7_">
<path id="XMLID_9_" class="st1" d="M84,17H70c-0.6,0-1,0.4-1,1s0.4,1,1,1h14c0.6,0,1-0.4,1-1S84.6,17,84,17z"/>
<path id="XMLID_8_" class="st1" d="M76.1,14.6c0.1,0.1,0.2,0.2,0.4,0.2c0.1,0.1,0.3,0.1,0.5,0.1s0.3-0.1,0.5-0.1
c0.1,0,0.3-0.1,0.4-0.2l3.5-3.5c0.4-0.4,0.4-1,0-1.4s-1-0.4-1.4,0l-2,2V4c0-0.6-0.4-1-1-1s-1,0.4-1,1v7.7l-2-2
c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4L76.1,14.6z"/>
</g>
<path id="XMLID_14_" d="M103.3,14c-0.8,0-1.5,0.3-2.1,0.8l-4.7-2.7c0.1-0.3,0.2-0.7,0.2-1.1s-0.1-0.8-0.2-1.1l4.7-2.7
c0.6,0.5,1.3,0.8,2.1,0.8c1.7,0,3.1-1.4,3.1-3.1s-1.4-3.1-3.1-3.1c-1.7,0-3.1,1.4-3.1,3.1c0,0.3,0,0.5,0.1,0.8l-4.9,2.8
c-0.5-0.4-1.1-0.6-1.8-0.6c-1.7,0-3.1,1.4-3.1,3.1s1.4,3.1,3.1,3.1c0.7,0,1.3-0.2,1.8-0.6l4.8,2.8c-0.1,0.3-0.1,0.5-0.1,0.8
c0,1.7,1.4,3.1,3.1,3.1s3.1-1.4,3.1-3.1C106.4,15.4,105,14,103.3,14z"/>
<g>
<path d="M112.6,10c0.5-0.5,1.2-0.5,1.7,0l5,5c0.5,0.5,0.5,1.2,0,1.7s-1.2,0.5-1.7,0l-5-5C112.1,11.2,112.1,10.5,112.6,10z"/>
<path d="M112.6,12c0.5,0.5,1.2,0.5,1.7,0l5-5c0.5-0.5,0.5-1.2,0-1.7s-1.2-0.5-1.7,0l-5,5C112.1,10.8,112.1,11.5,112.6,12z"/>
<path id="XMLID_13_" d="M129.4,12c-0.5,0.5-1.2,0.5-1.7,0l-5-5c-0.5-0.5-0.5-1.2,0-1.7s1.2-0.5,1.7,0l5,5
C129.9,10.8,129.9,11.5,129.4,12z"/>
<path d="M129.4,10c-0.5-0.5-1.2-0.5-1.7,0l-5,5c-0.5,0.5-0.5,1.2,0,1.7s1.2,0.5,1.7,0l5-5C129.9,11.2,129.9,10.5,129.4,10z"/>
<g id="XMLID_4_">
<path id="XMLID_21_" d="M150.9,3.7c0-0.1-0.1-0.2-0.2-0.3c-0.1-0.1-0.2-0.2-0.3-0.2C150.2,3,150.1,3,150,3h-4.2
c-0.5,0-0.8,0.4-0.8,0.8c0,0.5,1,1.2,1,1.2l0.8,0.8l-2.6,2.6c-0.4,0.4-0.4,1,0,1.4c0.4,0.4,1,0.4,1.4,0l2.6-2.6l1.3,1.4
c0.1,0.2,0.4,0.4,0.7,0.4c0.5,0,0.8-0.4,0.8-0.8V4C151,3.9,151,3.8,150.9,3.7z"/>
<path id="XMLID_22_" d="M140.4,12.2l-2.6,2.6l-1.3-1.4c-0.1-0.2-0.4-0.4-0.7-0.4c-0.5,0-0.8,0.4-0.8,0.8V18c0,0.1,0,0.3,0.1,0.4
c0,0.1,0.1,0.2,0.2,0.3c0.1,0.1,0.2,0.2,0.3,0.2c0.2,0.1,0.3,0.1,0.4,0.1h4.2c0.5,0,0.8-0.4,0.8-0.8s-1-1.2-1-1.2l-0.8-0.8
l2.6-2.6c0.4-0.4,0.4-1,0-1.4C141.4,11.8,140.8,11.8,140.4,12.2z"/>
</g>
</g>
<g>
<path d="M237.9,11L224,3v16L237.9,11z"/>
</g>
<g>
<path d="M216,19V3l-13.9,8L216,19z"/>
</g>
<use xlink:href="#imgtools" fill="#010202"></use>
<use xlink:href="#imgtools" fill="#fff" y="22"></use>
<use xlink:href="#imgplus"></use>
<use xlink:href="#imgplus" fill="#fff" y="22"></use>
<use xlink:href="#imgminus"></use>
<use xlink:href="#imgminus" fill="#fff" y="22"></use>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 152 76" style="enable-background:new 0 0 152 76;" xml:space="preserve">
<defs>
<g id="XMLID_16_">
<path id="sc-net" d="M144.9,0h-23.8c-3.9,0-7.1,3.2-7.1,7.1v23.7c0,3.9,3.2,7.1,7.1,7.1h23.8c3.9,0,7.1-3.2,7.1-7.1V7.1
C152,3.2,148.8,0,144.9,0z M146.7,28.3c0,1.3-1.1,2.4-2.4,2.4h-22.4c-1.3,0-2.4-1.1-2.4-2.4V9.7c0-1.3,1.1-2.4,2.4-2.4h22.4
c1.3,0,2.4,1.1,2.4,2.4V28.3z M68.9,0H45.1C41.2,0,38,3.2,38,7.1v23.7c0,3.9,3.2,7.1,7.1,7.1h23.7c3.9,0,7.1-3.2,7.1-7.1V7.1
C76,3.2,72.8,0,68.9,0z M67.1,14.6c0,0.2,0,0.4,0,0.7c0,6.9-5.2,14.8-14.8,14.8c-2.9,0-5.7-0.9-8-2.3c0.4,0,0.8,0.1,1.2,0.1
c2.4,0,4.7-0.8,6.5-2.2c-2.3,0-4.2-1.6-4.8-3.6c0.3,0,0.6,0.1,1,0.1c0.5,0,0.8-0.1,1.3-0.2c-2.4-0.5-4.3-2.6-4.3-5.1c0,0,0,0,0,0
c0.8,0.4,1.6,0.6,2.5,0.6c-1.4-0.9-2.3-2.5-2.3-4.3c0-0.9,0.3-1.9,0.7-2.6c2.6,3.2,6.4,5.2,10.7,5.4c-0.1-0.4-0.1-0.8-0.1-1.2
c0-2.9,2.3-5.2,5.2-5.2c1.5,0,2.8,0.6,3.8,1.6c1.2-0.2,2.3-0.7,3.3-1.3c-0.4,1.2-1.2,2.3-2.3,2.9c1.1-0.1,2.1-0.4,3-0.8
C69,13,68.1,13.9,67.1,14.6z M30.9,0H7.1C3.2,0,0,3.2,0,7.1v23.7C0,34.8,3.2,38,7.1,38h11.7V26.8h-5.3v-5.7h5.3V17
c0-4.8,3.2-7.5,7.9-7.5c2.2,0,4.2,0.1,4.7,0.2v5.1l-3.2,0c-2.6,0-3.1,1.1-3.1,2.7v3.6h6.1l-0.8,5.7h-5.3V38h5.7
c3.9,0,7.1-3.2,7.1-7.1V7.1C38,3.2,34.8,0,30.9,0z M136.8,20.6c-1.1,0.9-2.4,2-3.8,2h0h0c-1.5,0-2.8-1.1-3.8-2c-2-1.6-4-3.2-6-4.8
c-0.4-0.3-0.7-0.6-1-0.9v12.6c0,0.2,0.2,0.5,0.4,0.5h20.7c0.2,0,0.4-0.2,0.4-0.5V14.9c-0.3,0.3-0.6,0.6-1,0.9
C140.8,17.4,138.8,19,136.8,20.6z M106.9,0H83.1C79.2,0,76,3.2,76,7.1v23.7c0,3.9,3.2,7.1,7.1,7.1h23.8c3.9,0,7.1-3.2,7.1-7.1V7.1
C114,3.2,110.8,0,106.9,0z M89.6,28.5c-5.3,0-9.5-4.3-9.5-9.5c0-5.2,4.2-9.5,9.5-9.5c2.5,0,4.7,0.9,6.4,2.5l-2.6,2.5
c-0.7-0.7-2-1.5-3.8-1.5c-3.3,0-5.9,2.7-5.9,6s2.6,6,5.9,6c3.8,0,5.2-2.7,5.4-4.1h-5.4v-3.3h9c0.1,0.5,0.1,1,0.1,1.6
C98.7,24.6,95,28.5,89.6,28.5z M109.9,20.4h-2.7v2.7h-2.7v-2.7h-2.7v-2.7h2.7v-2.7h2.7v2.7h2.7V20.4z M143.3,10h-20.7
c-0.2,0-0.4,0.2-0.4,0.5c0,1.6,0.8,3,2.1,4c1.9,1.5,3.8,3,5.6,4.5c0.7,0.6,2.1,1.9,3.1,1.9h0h0c1,0,2.3-1.3,3.1-1.9
c1.9-1.5,3.7-3,5.6-4.5c0.9-0.7,2.1-2.3,2.1-3.5C143.8,10.6,143.9,10,143.3,10z"/>
</g>
</defs>
<use xlink:href="#sc-net" fill="#999"></use>
<use xlink:href="#sc-net" fill="#666666" y="38"></use>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="18 45 93 19" style="enable-background:new 18 45 93 19;" xml:space="preserve">
<style type="text/css">
.st0{fill:#5B5B5B;}
.st1{fill:#3A3A3A;}
.st2{opacity:0.42;fill:#8C8C8C;enable-background:new ;}
.st3{opacity:0.72;fill:#9B9B9B;enable-background:new ;}
.st4{fill:#9B9B9B;}
</style>
<path class="st0" d="M40.1,55.4c0-1.5,0.4-2.7,1.3-3.5c0.9-0.8,1.9-1.2,3.1-1.2s2.2,0.4,3.1,1.2c0.9,0.8,1.3,1.9,1.3,3.5
c0,1.5-0.4,2.7-1.3,3.5c-0.9,0.8-1.9,1.2-3.1,1.2s-2.2-0.4-3.1-1.2C40.6,58.1,40.1,56.9,40.1,55.4L40.1,55.4L40.1,55.4z M42,55.4
c0,1.1,0.2,1.8,0.6,2.3c0.4,0.5,0.8,0.8,1.3,0.9c0.1,0,0.2,0,0.3,0.1c0.1,0,0.2,0,0.3,0s0.2,0,0.3,0s0.2,0,0.3-0.1
c0.5-0.1,0.9-0.4,1.3-0.9c0.4-0.5,0.6-1.3,0.6-2.3s-0.2-1.8-0.6-2.3c-0.4-0.5-0.8-0.8-1.3-0.9c-0.1,0-0.2-0.1-0.3-0.1
c-0.1,0-0.2,0-0.3,0c-0.1,0-0.2,0-0.3,0c-0.1,0-0.2,0-0.3,0.1c-0.5,0.1-0.9,0.4-1.3,0.9C42.2,53.6,42,54.3,42,55.4L42,55.4L42,55.4z
"/>
<polygon class="st0" points="49.8,51 52.2,51 55.3,56.6 55.8,57.8 55.8,57.8 55.8,56.2 55.8,51 57.6,51 57.6,59.9 55.3,59.9
52.1,54 51.7,53 51.6,53 51.7,54.6 51.7,59.9 49.8,59.9 "/>
<polygon class="st0" points="59.1,51 61,51 61,58.4 64.6,58.4 64.6,59.9 59.1,59.9 "/>
<polygon class="st0" points="63.5,51 65.6,51 67.4,54 67.6,54.7 67.7,54.7 68,54 69.8,51 71.8,51 68.5,56.2 68.5,59.9 66.8,59.9
66.8,56.2 "/>
<path class="st1" d="M71.9,55.4c0-1.5,0.4-2.7,1.3-3.5s1.9-1.2,3.1-1.2s2.2,0.4,3.1,1.2c0.9,0.8,1.3,1.9,1.3,3.5
c0,1.5-0.4,2.7-1.3,3.5c-0.9,0.8-1.9,1.2-3.1,1.2c-1.2,0-2.2-0.4-3.1-1.2C72.3,58.1,71.9,56.9,71.9,55.4L71.9,55.4L71.9,55.4z
M73.8,55.4c0,1.1,0.2,1.8,0.6,2.3c0.4,0.5,0.8,0.8,1.3,0.9c0.1,0,0.2,0,0.3,0.1c0.1,0,0.2,0,0.3,0s0.2,0,0.3,0s0.2,0,0.3-0.1
c0.5-0.1,0.9-0.4,1.3-0.9c0.4-0.5,0.6-1.3,0.6-2.3s-0.2-1.8-0.6-2.3c-0.4-0.5-0.8-0.8-1.3-0.9c-0.1,0-0.2-0.1-0.3-0.1s-0.2,0-0.3,0
s-0.2,0-0.3,0s-0.2,0-0.3,0.1c-0.5,0.1-0.9,0.4-1.3,0.9C74,53.6,73.8,54.3,73.8,55.4L73.8,55.4L73.8,55.4z"/>
<polygon class="st1" points="81.6,51 86.6,51 86.6,52.5 83.4,52.5 83.4,54.6 86.5,54.6 86.5,56.1 83.4,56.1 83.4,59.9 81.6,59.9 "/>
<polygon class="st1" points="87.7,51 92.7,51 92.7,52.5 89.5,52.5 89.5,54.6 92.5,54.6 92.5,56.1 89.5,56.1 89.5,59.9 87.7,59.9 "/>
<polygon class="st1" points="93.7,59.9 93.7,51 95.6,51 95.6,59.9 "/>
<path class="st1" d="M103.8,51.2v1.6c-0.3-0.1-0.6-0.2-1-0.3s-0.7-0.1-1.1-0.1c-1,0-1.7,0.3-2.2,0.9c-0.5,0.6-0.8,1.3-0.8,2.2
s0.2,1.6,0.7,2.2c0.5,0.6,1.2,0.9,2.1,0.9c0.3,0,0.7,0,1-0.1c0.4,0,0.8-0.2,1.2-0.3l0.1,1.5c-0.1,0-0.1,0.1-0.2,0.1
s-0.2,0.1-0.4,0.1c-0.2,0-0.4,0-0.8,0c-0.3,0-0.7,0.1-1.1,0.1c-0.1,0-0.1,0-0.2,0s-0.1,0-0.2,0c-1-0.1-2-0.5-2.9-1.2
s-1.3-1.8-1.3-3.4c0-1.5,0.4-2.6,1.3-3.5c0.9-0.8,2-1.2,3.4-1.2c0.4,0,0.7,0,1,0s0.6,0.1,0.9,0.2c0.1,0,0.1,0,0.2,0.1
C103.6,51.1,103.7,51.1,103.8,51.2L103.8,51.2L103.8,51.2z"/>
<polygon class="st1" points="104.9,51 110.4,51 110.4,52.4 106.8,52.4 106.8,54.5 110,54.5 110,55.9 106.8,55.9 106.8,58.5
110.4,58.5 110.4,59.9 104.9,59.9 "/>
<path class="st2" d="M26.2,63l-7.7-3.7c-0.7-0.3-0.7-0.8,0-1.1l2.6-1.3l5.1,2.4c0.7,0.3,1.7,0.3,2.4,0l5.1-2.4l2.7,1.3
c0.7,0.3,0.7,0.8,0,1.1L28.7,63C28,63.3,26.9,63.3,26.2,63L26.2,63z"/>
<path class="st3" d="M26.2,58.6l-7.7-3.7c-0.7-0.3-0.7-0.8,0-1.1l2.7-1.3l5.1,2.4c0.7,0.3,1.7,0.3,2.4,0l5.2-2.4l2.7,1.2
c0.7,0.3,0.7,0.8,0,1.1l-7.8,3.7C28,58.9,26.9,58.9,26.2,58.6L26.2,58.6z"/>
<path class="st4" d="M26.2,54.2l-7.7-3.7c-0.7-0.3-0.7-0.8,0-1.1l7.7-3.7c0.7-0.3,1.7-0.3,2.4,0l7.7,3.7c0.7,0.3,0.7,0.8,0,1.1
l-7.7,3.7C28,54.5,26.9,54.5,26.2,54.2L26.2,54.2z"/>
</svg>
......@@ -273,25 +273,25 @@
<div class="overlay-controls" style="margin-left: -32px">
<ul class="left">
<li id="id-btn-zoom-in"><button class="overlay"><i class="overlay-icon-zoom-in"></i></button></li>
<li id="id-btn-zoom-out"><button class="overlay"><i class="overlay-icon-zoom-out"></i></button></li>
<li id="id-btn-zoom-in"><button class="overlay svg-icon zoom-up"></button></li>
<li id="id-btn-zoom-out"><button class="overlay svg-icon zoom-down"></button></li>
</ul>
</div>
<div class="toolbar" id="toolbar">
<ul class="left">
<li><a id="header-logo" class="brand-logo" href="http://www.onlyoffice.com/" target="_blank"></a></li>
<li class="separator"></li>
<li id="id-btn-copy"><button class="control-btn"><i class="control-icon-save"></i><span>Save Copy</span></button></li>
<li id="id-btn-share"><button class="control-btn"><i class="control-icon-share"></i><span>Share</span></button></li>
<li id="id-btn-embed"><button class="control-btn"><i class="control-icon-embed"></i><span>Embed</span></button></li>
</ul>
<ul class="right">
<li><input id="page-number" class="form-control input-sm" style="width: 25px;" type="text" value="0"><span class="text" id="pages">of 0</span></li>
<li class="separator"></li>
<li><button id="id-btn-fullscreen" class="control-btn no-caption"><i class="control-icon-fullscreen"></i></button></li>
<li><button id="id-btn-close" class="control-btn no-caption"><i class="control-icon-close"></i></button></li>
</ul>
<div class="group left">
<div id="box-tools" class="dropdown">
<button class="control-btn svg-icon tools"></button>
</div>
</div>
<div class="group center">
<span><a id="header-logo" class="brand-logo" href="http://www.onlyoffice.com/" target="_blank"></a></span>
</div>
<div class="group right">
<div class="item"><input id="page-number" class="form-control input-xs masked" type="text" value="0"><span class="text" id="pages" tabindex="-1">of 0</span></div>
<div class="item separator"></div>
<div class="item"><button id="id-btn-close" class="control-btn close"><span aria-hidden="true">&times;</span></button></div>
</div>
</div>
<div class="modal fade error" id="id-critical-error-dialog" tabindex="-1" role="dialog">
......@@ -315,10 +315,13 @@
<div class="cmd-loader-title">Please wait...</div>
</div>
<div class="hyperlink-tooltip" data-toggle="tooltip" title="Press Ctrl and click the link" style="display:none;"></div>
<!--vendor-->
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../../../vendor/jquery.browser/dist/jquery.browser.min.js"></script>
<script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.js"></script>
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
<script type="text/javascript" src="../../../vendor/jszip/jszip.min.js"></script>
......@@ -335,6 +338,7 @@
<!--application-->
<script type="text/javascript" src="../../common/Gateway.js"></script>
<script type="text/javascript" src="../../common/Analytics.js"></script>
<script type="text/javascript" src="../../common/embed/lib/view/modals.js"></script>
<script type="text/javascript" src="js/ApplicationView.js"></script>
<script type="text/javascript" src="js/ApplicationController.js"></script>
<script type="text/javascript" src="js/application.js"></script>
......
......@@ -32,49 +32,56 @@
*/
var ApplicationView = new(function(){
var $btnTools;
var $dlgEmbed,
$dlgShare;
// Initialize view
function createView(){
$('#id-btn-share').popover({
trigger : 'manual',
html : true,
template : '<div class="popover share" id="id-popover-share"><div class="arrow"></div><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>',
content : '<div class="share-link">' +
'<span class="caption">Link:</span>' +
'<input id="id-short-url" class="input-xs form-control" readonly/>' +
'<button id="id-btn-copy-short" type="button" class="btn btn-xs btn-primary" style="width: 65px;" data-copied-text="Copied">Copy</button>' +
'</div> ' +
'<div class="share-buttons" style="height: 25px" id="id-popover-social-container" data-loaded="false">' +
'<ul></ul>' +
'</div>'
}).popover('show');
$('#id-btn-embed').popover({
trigger : 'manual',
html : true,
template : '<div class="popover embed" id="id-popover-embed"><div class="arrow"></div><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>',
content : '<div class="size-manual">' +
'<span class="caption">Width:</span>' +
'<input id="id-input-embed-width" class="form-control input-xs" type="text" value="400px">' +
'<input id="id-input-embed-height" class="form-control input-xs right" type="text" value="600px">' +
'<span class="right caption">Height:</span>' +
'</div>' +
'<textarea id="id-textarea-embed" rows="4" class="form-control" readonly></textarea>' +
'<button id="id-btn-copy-embed" type="button" class="btn btn-xs btn-primary" data-copied-text="Copied">Copy</button>'
$btnTools = $('#box-tools button');
$btnTools.addClass('dropdown-toggle').attr('data-toggle', 'dropdown').attr('aria-expanded', 'true');
$btnTools.parent().append(
'<ul class="dropdown-menu">' +
'<li><a id="idt-download" href="#"><span class="mi-icon svg-icon download"></span>Download</a></li>' +
'<li><a id="idt-share" href="#" data-toggle="modal"><span class="mi-icon svg-icon share"></span>Share</a></li>' +
'<li><a id="idt-embed" href="#" data-toggle="modal"><span class="mi-icon svg-icon embed"></span>Embed</a></li>' +
'<li><a id="idt-fullscreen" href="#"><span class="mi-icon svg-icon fullscr"></span>Full Screen</a></li>' +
'</ul>');
}
}).popover('show');
function getTools(name) {
return $btnTools.parent().find(name);
}
$('body').popover({
trigger : 'manual',
html : true,
animation : false,
template : '<div class="popover hyperlink" id="id-tip-hyperlink"><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>',
content : '<br><b>Press Ctrl and click link</b>'
}).popover('show');
function getModal(name) {
switch (name) {
case 'embed': return $dlgEmbed;
case 'share': return $dlgShare;
}
}
return {
create: createView
, tools: {
get: getTools
}
, modals: {
get: getModal
, create: function (config) {
if ( !$dlgShare && !!config.shareUrl ) {
$dlgShare = utils.modals.create('share');
$btnTools.parent().find('#idt-share').attr('data-target', "#" + $dlgShare.attr('id'));
$dlgShare.find('#id-short-url').val(config.shareUrl);
}
if ( !$dlgEmbed && !!config.embedUrl ) {
$dlgEmbed = utils.modals.create('embed');
$btnTools.parent().find('#idt-embed').attr('data-target', "#"+ $dlgEmbed.attr('id'));
}
}
}
}
})();
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