Commit 5b23abc0 authored by Maxim Kadushkin's avatar Maxim Kadushkin

[common] refactoring

parent 960d5850
......@@ -67,7 +67,9 @@
iframePrint.src = url;
}
},
htmlEncode: function(value) {
return $('<div/>').text(value).html();
}
};
})();
......
......@@ -3,7 +3,6 @@
<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
......@@ -21,7 +20,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>
......
<?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">
viewBox="-4 23 100 24" style="enable-background:new -4 23 100 24;" xml:space="preserve">
<style type="text/css">
.st0{fill:#5B5B5B;}
.st1{fill:#3A3A3A;}
......@@ -9,36 +9,37 @@
.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
<path class="st0" d="M21.3,35.5c0-1.5,0.4-2.7,1.3-3.5c0.9-0.8,1.9-1.2,3.1-1.2c1.2,0,2.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.2C21.8,38.2,21.3,37,21.3,35.5L21.3,35.5L21.3,35.5z
M23.2,35.5c0,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,0c0.1,0,0.2,0,0.3,0
c0.1,0,0.2,0,0.3-0.1c0.5-0.1,0.9-0.4,1.3-0.9c0.4-0.5,0.6-1.3,0.6-2.3c0-1-0.2-1.8-0.6-2.3c-0.4-0.5-0.8-0.8-1.3-0.9
c-0.1,0-0.2-0.1-0.3-0.1c-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.9
C23.4,33.7,23.2,34.4,23.2,35.5L23.2,35.5L23.2,35.5z"/>
<polygon class="st0" points="31,31.1 33.4,31.1 36.5,36.7 37,37.9 37,37.9 37,36.3 37,31.1 38.8,31.1 38.8,40 36.5,40 33.3,34.1
32.9,33.1 32.8,33.1 32.9,34.7 32.9,40 31,40 "/>
<polygon class="st0" points="40.3,31.1 42.2,31.1 42.2,38.5 45.8,38.5 45.8,40 40.3,40 "/>
<polygon class="st0" points="44.7,31.1 46.8,31.1 48.6,34.1 48.8,34.8 48.9,34.8 49.2,34.1 51,31.1 53,31.1 49.7,36.3 49.7,40
48,40 48,36.3 "/>
<path class="st1" d="M53.1,35.5c0-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.2c-1.2,0-2.2-0.4-3.1-1.2C53.5,38.2,53.1,37,53.1,35.5L53.1,35.5L53.1,35.5z
M55,35.5c0,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,0c0.1,0,0.2,0,0.3,0
c0.1,0,0.2,0,0.3-0.1c0.5-0.1,0.9-0.4,1.3-0.9c0.4-0.5,0.6-1.3,0.6-2.3c0-1-0.2-1.8-0.6-2.3s-0.8-0.8-1.3-0.9
c-0.1,0-0.2-0.1-0.3-0.1c-0.1,0-0.2,0-0.3,0c-0.1,0-0.2,0-0.3,0s-0.2,0-0.3,0.1c-0.5,0.1-0.9,0.4-1.3,0.9C55.2,33.7,55,34.4,55,35.5
L55,35.5L55,35.5z"/>
<polygon class="st1" points="62.8,31.1 67.8,31.1 67.8,32.6 64.6,32.6 64.6,34.7 67.7,34.7 67.7,36.2 64.6,36.2 64.6,40 62.8,40 "/>
<polygon class="st1" points="68.9,31.1 73.9,31.1 73.9,32.6 70.7,32.6 70.7,34.7 73.7,34.7 73.7,36.2 70.7,36.2 70.7,40 68.9,40 "/>
<polygon class="st1" points="74.9,40 74.9,31.1 76.8,31.1 76.8,40 "/>
<path class="st1" d="M85,31.3v1.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"/>
s-0.2,0.1-0.4,0.1C84.2,40,84,40,83.6,40c-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
c-0.9-0.7-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,0c0.3,0,0.6,0.1,0.9,0.2c0.1,0,0.1,0,0.2,0.1
C84.8,31.2,84.9,31.2,85,31.3L85,31.3L85,31.3z"/>
<polygon class="st1" points="86.1,31.1 91.6,31.1 91.6,32.5 88,32.5 88,34.6 91.2,34.6 91.2,36 88,36 88,38.6 91.6,38.6 91.6,40
86.1,40 "/>
<path class="st2" d="M7.4,43.1l-7.7-3.7c-0.7-0.3-0.7-0.8,0-1.1L2.3,37l5.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.1l-7.7,3.7C9.2,43.4,8.1,43.4,7.4,43.1L7.4,43.1z"/>
<path class="st3" d="M7.4,38.7L-0.3,35c-0.7-0.3-0.7-0.8,0-1.1l2.7-1.3L7.5,35c0.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.1L10,38.6C9.2,39,8.1,39,7.4,38.7L7.4,38.7z"/>
<path class="st4" d="M7.4,34.3l-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.7C9.2,34.6,8.1,34.6,7.4,34.3L7.4,34.3z"/>
</svg>
......@@ -107,7 +107,6 @@
font-size: @toolbarFontSize;
min-width: 340px;
z-index: 100;
//#gradient > .vertical(@toolbarTopColor, @toolbarBottomColor);
background-color: @toolbarTopColor;
&.top {
......@@ -146,8 +145,6 @@
display: inline-block;
width: 35px;
padding: 0;
//height: 25px;
//margin: 0 3px;
text-align: right;
}
......@@ -208,39 +205,16 @@
display: block;
width: 100px;
height: 24px;
//background-image: url("@{iconSpriteCommonPath}");
//background-position: 0 -100px;
background: data-uri('../../../../common/embed/resources/img/logo.svg') no-repeat;
}
// Sprite icons path
// -------------------------
[class^="overlay-icon-"],
[class*=" overlay-icon-"] {
display: inline-block;
width: 32px;
height: 32px;
vertical-align: text-top;
background-image: url("@{iconSpriteCommonPath}");
background-repeat: no-repeat;
opacity: .3;
}
.overlay-icon-zoom-in { background-position: 0 -120px; }
.overlay-icon-zoom-out { background-position: -32px -120px; }
// Control buttons
// -------------------------
.control-btn {
display: inline-block;
//padding: 1px 5px;
//font-size: @toolbarFontSize;
//line-height: 20px;
//text-align: center;
vertical-align: middle;
cursor: pointer;
background-color: transparent;
//background-image: none;
border: 1px solid transparent;
border-radius: 2px;
//margin: 0;
......@@ -268,8 +242,6 @@
outline: none;
border: 1px solid @btnActiveColor;
background-color: @btnActiveColor;
//#gradient > .vertical(@controlBtnHoverTopColor, @controlBtnHoverBottomColor);
//text-shadow: 0 1px 0 darken(@toolbarBorderColor, 20%);
}
}
......@@ -304,18 +276,17 @@
height: 32px;
display: inline-block;
//text-align: center;
//vertical-align: middle;
cursor: pointer;
background-color: black;
//background-image: none;
border: 5px solid black;
border-radius: 50%;
//padding: 0;
//line-height: 0;
outline: none;
opacity: 0.3;
-webkit-box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
-moz-box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
&:hover {
opacity: .6;
}
......@@ -356,87 +327,6 @@
}
}
// Share popover
// -------------------------
.popover{
.popover-content {
padding: 14px;
}
&.share {
width: 280px;
.share-link {
margin-bottom: 5px;
.caption {
margin-top: 3px;
margin-right: 8px;
float: left;
}
input[readonly] {
display: inline-block;
font-size: 1em;
padding: 0 4px;
margin-right: 5px;
border-radius: 0;
cursor: text;
background-color: #fff;
-moz-user-select: text;
-khtml-user-select: text;
-webkit-user-select: text;
-ms-user-select: text;
user-select: text;
}
.input-xs {
width: 130px;
}
.btn {
float: right;
}
}
}
&.embed {
width: 270px;
.size-manual {
margin-bottom: 10px;
}
.right {
float: right;
}
.caption {
margin-top: 2px;
margin-right: 8px;
}
input {
display: inline-block;
font-size: 1em;
padding: 0 4px;
border-radius: 0;
margin: 0;
margin-top: -1px;
&.input-xs {
width: 50px;
}
}
button {
float: right;
margin: 10px 0 15px;
width: 86px;
}
}
}
// Modals
// -------------------------
.modal {
......@@ -512,22 +402,12 @@
}
}
.list-hor-align {
li {
float: left;
a {
display: block;
}
}
}
.socnet-btn(@index) {
background-position: -@icon-socnet-size*@index 0;
background-position: -@icon-socnet-size*@index 0;
&:hover {
background-position: -@icon-socnet-size*@index -@icon-socnet-size;
}
&:hover {
background-position: -@icon-socnet-size*@index -@icon-socnet-size;
}
}
.svg {
......
......@@ -55,14 +55,6 @@ var ApplicationController = new(function(){
return;
}
// Utils
// -------------------------
function htmlEncode(value){
return $('<div/>').text(value).html();
}
// Handlers
// -------------------------
......
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