Updated application.

This commit is contained in:
agolybev
2015-08-17 17:19:04 +03:00
parent cd34405d7e
commit a7b9b3a979
330 changed files with 81139 additions and 172701 deletions

View File

@@ -81,13 +81,13 @@
function loadConfig(data) {
config = $.extend(config, data.config);
embedConfig = $.extend(embedConfig, data.config.embedded);
$("#id-short-url").text(embedConfig.shareUrl || "Unavailable");
$("#id-short-url").val(embedConfig.shareUrl || "Unavailable");
$("#id-textarea-embed").text(embedCode.replace("{embed-url}", embedConfig.embedUrl).replace("{width}", minEmbedWidth).replace("{height}", minEmbedHeight));
if (typeof embedConfig.shareUrl !== "undefined" && embedConfig.shareUrl != "") {
if ($("#id-popover-social-container ul")) {
$("#id-popover-social-container ul").append('<li><div class="fb-like" data-href="' + embedConfig.shareUrl + '" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false"></div></li>');
$("#id-popover-social-container ul").append('<li class="share-twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-url="' + embedConfig.shareUrl + '">Tweet</a></li>');
$("#id-popover-social-container ul").append('<li class="share-mail"><a class="btn btn-mini" href="mailto:?subject=I have shared a document with you: ' + embedConfig.docTitle + "&body=I have shared a document with you: " + embedConfig.shareUrl + '"><i class="icon-envelope"></i>Email</a></li>');
$("#id-popover-social-container ul").append('<li class="share-mail"><a class="btn btn-xs btn-default" href="mailto:?subject=I have shared a document with you: ' + embedConfig.docTitle + "&body=I have shared a document with you: " + embedConfig.shareUrl + '"><span class="glyphicon glyphicon-envelope"></span>Email</a></li>');
}
}
if (typeof embedConfig.shareUrl === "undefined") {
@@ -210,12 +210,18 @@
Common.Analytics.trackEvent("Load", "Complete");
}
function onEditorPermissions(params) {
if (params.asc_getCanBranding() && (typeof config.customization == "object") && config.customization && config.customization.logoUrlEmbedded) {
$("#header-logo").css({
"background-image": 'url("' + config.customization.logoUrlEmbedded + '")',
"background-position": "0 center",
"background-repeat": "no-repeat"
});
if (params.asc_getCanBranding() && (typeof config.customization == "object") && config.customization && config.customization.logo) {
var logo = $("#header-logo");
if (config.customization.logo.imageEmbedded) {
logo.css({
"background-image": 'url("' + config.customization.logo.imageEmbedded + '")',
"background-position": "0 center",
"background-repeat": "no-repeat"
});
}
if (config.customization.logo.url) {
logo.attr("href", config.customization.logo.url);
}
}
}
function showMask() {
@@ -308,7 +314,7 @@
if (visible) {
if (owner) {
popover.css("display", "block");
var popoverData = owner.data("popover"),
var popoverData = owner.data("bs.popover"),
$tip = popoverData.tip(),
pos = popoverData.getPosition(false),
actualHeight = $tip[0].offsetHeight,
@@ -378,7 +384,7 @@
}
$("#id-btn-copy-short").button("copied");
$("#id-btn-copy-short").addClass("copied");
clipShortUrl.setText($("#id-short-url").text());
clipShortUrl.setText($("#id-short-url").val());
setTimeout(function () {
$("#id-btn-copy-short").button("reset");
$("#id-btn-copy-short").removeClass("copied");

View File

@@ -35,13 +35,13 @@
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>' + '<span id="id-short-url" class="input-medium uneditable-input"></span>' + '<button id="id-btn-copy-short" type="button" class="btn btn-mini 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>"
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="input-mini" type="text" value="400px">' + '<input id="id-input-embed-height" class="right input-mini" type="text" value="600px">' + '<span class="right caption">Height:</span>' + "</div>" + '<textarea id="id-textarea-embed" rows="4" readonly></textarea>' + '<button id="id-btn-copy-embed" type="button" class="btn btn-mini btn-primary" data-copied-text="Copied">Copy</button>'
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>'
}).popover("show");
$("body").popover({
trigger: "manual",

View File

@@ -68,9 +68,6 @@
font-size: 12px;
overflow: hidden;
}
.popover.top {
margin-top: -10px;
}
.viewer {
position: absolute;
margin: 0;
@@ -345,114 +342,6 @@ a.brand-logo {
font-size: 1.6em;
padding-bottom: 10px;
}
.popover .popover-content {
padding: 14px;
}
.popover .btn {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.popover.hyperlink .popover-content {
padding: 5px 10px;
}
.popover.hyperlink .popover-content p {
display: block;
word-wrap: break-word;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.popover.share {
width: 280px;
}
.popover.share .share-link .caption {
margin-right: 8px;
float: left;
}
.popover.share .share-link .uneditable-input {
font-size: 1em;
padding: 0 4px;
margin-right: 5px;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
cursor: auto;
-moz-user-select: text;
-khtml-user-select: text;
-webkit-user-select: text;
-ms-user-select: text;
user-select: text;
}
.popover.share .share-link .input-medium {
width: 130px;
}
.popover.share .share-link .btn {
float: right;
}
.popover.share .share-buttons ul {
height: 25px;
list-style-type: none;
margin: 5px 0 0;
overflow: hidden;
}
.popover.share .share-buttons ul li {
display: inline-block;
float: left;
margin: 1px 5px 0 0;
vertical-align: middle;
}
.popover.share .share-buttons ul li.share-mail {
float: right;
margin: 0;
}
.popover.share .share-buttons ul li.share-mail a {
padding: 2px 8px;
}
.popover.share .share-buttons ul li.share-mail i {
margin-right: 5px;
}
.popover.share .share-buttons ul li.share-twitter {
max-width: 100px;
}
.popover.embed {
width: 270px;
}
.popover.embed .size-manual {
margin-bottom: 10px;
}
.popover.embed .right {
float: right;
}
.popover.embed .caption {
margin-right: 8px;
}
.popover.embed input {
font-size: 1em;
padding: 0 4px;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
margin: 0;
margin-top: -1px;
}
.popover.embed input.input-mini {
width: 40px;
}
.popover.embed textarea {
width: 228px;
resize: none;
cursor: auto;
font-size: 1em;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.popover.embed button {
float: right;
margin: 5px 0 15px;
width: 86px;
}
.modal.error .modal-footer {
text-align: center;
}