Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
Please find my Bookmark Java script below,
Now i want to delete created book mark in the java script. Could you please give some suggestion how to do
function AppUi ( app ) { var me = this; this.app = app; app.global.isPersonalMode( function ( reply ) { me.isPersonalMode = reply.qReturn; } ); app.getAppLayout( function ( layout ) { $( "#title" ).html( layout.qTitle ); $( "#title" ).attr( "title", "Last reload:" + layout.qLastReloadTime.replace( /T/, ' ' ).replace( /Z/, ' ' ) ); //TODO: bootstrap tooltip ?? } ); app.getList( 'SelectionObject', function ( reply ) { $( "[data-qcmd='back']" ).parent().toggleClass( 'disabled', reply.qSelectionObject.qBackCount < 1 ); $( "[data-qcmd='forward']" ).parent().toggleClass( 'disabled', reply.qSelectionObject.qForwardCount < 1 ); } ); app.getList( "BookmarkList", function ( reply ) { var str = ""; reply.qBookmarkList.qItems.forEach( function ( value ) { if ( value.qData.title ) { str += '<li><a data-id="' + value.qInfo.qId + '">' + value.qData.title + '</a></li>'; } } ); str += '<li><a data-cmd="create">Create</a></li>'; $( '#qbmlist' ).html( str ).find( 'a' ).on( 'click', function () { var id = $( this ).data( 'id' ); if ( id ) { app.bookmark.apply( id ); } else { var cmd = $( this ).data( 'cmd' ); if ( cmd === "create" ) { $( '#createBmModal' ).modal(); } } } ); } ); $( "[data-qcmd]" ).on( 'click', function () { var $element = $( this ); switch ( $element.data( 'qcmd' ) ) { case 'createBm': var title = $( "#bmtitle" ).val(), desc = $( "#bmdesc" ).val(); app.bookmark.create( title, desc ); $( '#createBmModal' ).modal( 'hide' ); break; } } ); }