[common] added coauth icons to header's 'save' button
This commit is contained in:
parent
8a9c221eb3
commit
9dcf65d8df
|
@ -496,6 +496,19 @@ define([
|
|||
me.btnUndo = createTitleButton('svg-btn-undo', $('#slot-btn-dt-undo', $html), true);
|
||||
me.btnRedo = createTitleButton('svg-btn-redo', $('#slot-btn-dt-redo', $html), true);
|
||||
|
||||
if ( me.btnSave.$icon.is('svg') ) {
|
||||
me.btnSave.$icon.addClass('icon-save');
|
||||
var _create_use = function (extid, intid) {
|
||||
var _use = document.createElementNS('http://www.w3.org/2000/svg', 'use');
|
||||
_use.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', extid);
|
||||
_use.setAttribute('id', intid);
|
||||
|
||||
return $(_use);
|
||||
};
|
||||
|
||||
_create_use('#svg-btn-save-coauth', 'coauth').appendTo(me.btnSave.$icon);
|
||||
_create_use('#svg-btn-save-sync', 'sync').appendTo(me.btnSave.$icon);
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -35,9 +35,25 @@
|
|||
<symbol id="svg-btn-save" viewBox="0 0 20 20">
|
||||
<rect x="7" y="13" width="6" height="1"/>
|
||||
<rect x="7" y="11" width="6" height="1"/>
|
||||
<path fill="#FFFFFF" d="M13,4H5C4.447,4,4,4.447,4,5v10c0,0.553,0.447,1,1,1h10c0.553,0,1-0.447,1-1V7L13,4z M11,5v2h-1V5H11z
|
||||
<path d="M13,4H5C4.447,4,4,4.447,4,5v10c0,0.553,0.447,1,1,1h10c0.553,0,1-0.447,1-1V7L13,4z M11,5v2h-1V5H11z
|
||||
M15,15H5V5h2v3h5V5h0.5L15,7.5V15z"/>
|
||||
</symbol>
|
||||
<symbol id="svg-btn-save-coauth" viewBox="0 0 20 20">
|
||||
<path d="M14,9c-2.209,0-4,1.791-4,4c0,0.348,0.059,0.679,0.142,1h1.043C11.072,13.686,11,13.353,11,13
|
||||
c0-1.654,1.346-3,3-3s3,1.346,3,3s-1.346,3-3,3v-1l-2,1.5l2,1.5v-1c2.209,0,4-1.791,4-4S16.209,9,14,9z"/>
|
||||
<rect x="6" y="13" width="3" height="1"/>
|
||||
<rect x="6" y="11" width="3" height="1"/>
|
||||
<path d="M9,15H4V5h2v3h3h2V5h0.5L14,7.5V8h1V7l-3-3H4C3.447,4,3,4.447,3,5v10c0,0.553,0.447,1,1,1h5V15z M9,5h1v2H9 V5z"/>
|
||||
</symbol>
|
||||
<symbol id="svg-btn-save-sync" viewBox="0 0 20 20">
|
||||
<path fill="#FFD112" d="M18,16c0.553,0,1-0.447,1-1v-5c0-0.553-0.447-1-1-1h-7c-0.553,0-1,0.447-1,1v5c0,0.553,0.447,1,1,1h1
|
||||
l1.5,2l1.5-2H18z"/>
|
||||
<rect x="12" y="11" fill="#444444" width="5" height="1"/>
|
||||
<rect x="12" y="13" fill="#444444" width="5" height="1"/>
|
||||
<rect x="6" y="13" width="3" height="1"/>
|
||||
<rect x="6" y="11" width="3" height="1"/>
|
||||
<path d="M9,15H4V5h2v3h3h2V5h0.5L14,7.5V8h1V7l-3-3H4C3.447,4,3,4.447,3,5v10c0,0.553,0.447,1,1,1h5V15z M9,5h1v2H9 V5z"/>
|
||||
</symbol>
|
||||
<symbol id="svg-btn-undo" viewBox="0 0 20 20">
|
||||
<path d="M11.355,7.625c-1.965,0-3.864,0.777-5.151,2.033L4,7.625V14h6.407l-2.091-2.219
|
||||
c0.845-1.277,2.313-2.215,3.99-2.215c2.461,0,5.405,1.78,5.694,4.119C17.601,10.291,14.966,7.625,11.355,7.625z"/>
|
||||
|
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 4.5 KiB |
|
@ -289,6 +289,25 @@
|
|||
|
||||
svg.icon {
|
||||
fill: #fff;
|
||||
|
||||
&.icon-save {
|
||||
&.btn-save-coauth, &.btn-synch {
|
||||
use:first-child {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.btn-save-coauth) {
|
||||
use#coauth {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
&:not(.btn-synch) {
|
||||
use#sync {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#title-doc-name {
|
||||
|
|
Loading…
Reference in a new issue