Commit 23fd68cb authored by techird's avatar techird

merge from dev

parents d8bc24f8 6f2a9ca6
...@@ -40,11 +40,10 @@ ...@@ -40,11 +40,10 @@
helpContent += '</div>'; helpContent += '</div>';
var utils = KM.utils;
KM.registerWidget( 'help', { KM.registerWidget( 'help', {
tpl: helpContent, tpl: helpContent,
initContent: function ( km ) { initContent: function ( km ) {
var lang = km.getLang( 'dialogs.markers' ), var lang = km.getLang( 'dialogs.help' ),
html; html;
if ( lang ) { if ( lang ) {
html = $.parseTmpl( this.tpl, lang ); html = $.parseTmpl( this.tpl, lang );
...@@ -52,43 +51,8 @@ ...@@ -52,43 +51,8 @@
this.root().html( html ); this.root().html( html );
}, },
initEvent: function ( km, $w ) { initEvent: function ( km, $w ) {
$w.on( "click", "li", function () {
var $this = $( this );
$this.siblings().removeClass( "active" );
$this.toggleClass( "active" );
var val = $this.val();
if ( !$this.hasClass( "active" ) ) {
val = null;
}
var type = $this.attr( "type" );
km.execCommand( type, val );
} );
km.on( 'interactchange', function ( e ) {
var valPri = this.queryCommandValue( "priority" );
var valPro = this.queryCommandValue( "progress" );
$w.find( "li[type='priority']" ).removeClass( "active" );
$w.find( "li[type='priority'][value='" + valPri + "']" ).addClass( "active" );
$w.find( "li[type='progress']" ).removeClass( "active" );
$w.find( "li[type='progress'][value='" + valPro + "']" ).addClass( "active" );
} );
}, },
buttons: {
'ok': {
exec: function ( km, $w ) {
var href = $( '#kmui-link-Jhref' ).val().replace( /^\s+|\s+$/g, '' );
if ( href ) {
km.execCommand( 'link', {
'href': href,
'target': $( "#kmui-link-Jtarget:checked" ).length ? "_blank" : '_self',
'title': $( "#kmui-link-Jtitle" ).val().replace( /^\s+|\s+$/g, '' ),
'_href': href
} );
}
}
},
'cancel': {}
},
width: 400 width: 400
} ); } );
} )(); } )();
\ No newline at end of file
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
max-height: 400px; max-height: 400px;
font-size: 12px; font-size: 12px;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden;
} }
.kmui-modal-footer { .kmui-modal-footer {
float: right; float: right;
......
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