@@ -26,6 +26,8 @@ export default class Util {
2626 } else if ( typeof callback !== 'function' ) {
2727 throw TypeError ( 'Param \'callback\' has to be a function.' ) ;
2828 } else {
29+ console . time ( "util.js:promptUser duration" ) ;
30+
2931 const inputPrompt = document . createElement ( 'div' ) ;
3032 inputPrompt . id = 'input-prompt' ;
3133
@@ -78,6 +80,8 @@ export default class Util {
7880 window . addEventListener ( 'keyup' , handleKey , true ) ;
7981
8082 modal . show ( ) ;
83+
84+ console . timeEnd ( "util.js:promptUser duration" ) ;
8185 }
8286 }
8387
@@ -87,6 +91,8 @@ export default class Util {
8791 } else if ( typeof callback !== 'function' ) {
8892 throw TypeError ( 'Param \'callback\' has to be a function.' ) ;
8993 } else {
94+ console . time ( "util.js:promptSearch duration" ) ;
95+
9096 const searchPrompt = document . createElement ( 'div' ) ;
9197 searchPrompt . id = 'search-prompt' ;
9298
@@ -114,8 +120,8 @@ export default class Util {
114120 listDOMstring += IconHelper . getIconTag ( 'default' ) ;
115121 }
116122 }
117- listDOMstring += '<p class="value">' ;
118- listDOMstring += currentValue ;
123+ listDOMstring += '<p class="value" data-id="' + currentValue . uid + '" >';
124+ listDOMstring += currentValue . title ;
119125 listDOMstring += '</p></li>' ;
120126 } ) ;
121127 listDOMstring += '</ol><button class="btn btn-default" id="prompt-cancel">' + options . btncancel + '</button>' ;
@@ -179,6 +185,8 @@ export default class Util {
179185 window . addEventListener ( 'keyup' , handleKey , true )
180186
181187 modal . show ( ) ;
188+
189+ console . timeEnd ( "util.js:promptSearch duration" ) ;
182190 }
183191 }
184192
@@ -188,6 +196,8 @@ export default class Util {
188196 } else if ( typeof callback !== 'function' ) {
189197 throw TypeError ( 'Param \'callback\' has to be a function.' ) ;
190198 } else {
199+ console . time ( "util.js:promptDelete duration" ) ;
200+
191201 const deletePrompt = document . createElement ( 'div' ) ;
192202 deletePrompt . id = 'delete-prompt' ;
193203 $ ( '#delete-prompt' ) . addClass ( 'control-group' ) ;
@@ -237,6 +247,8 @@ export default class Util {
237247 } ) ;
238248
239249 modal . show ( ) ;
250+
251+ console . timeEnd ( "util.js:promptDelete duration" ) ;
240252 }
241253 }
242254
@@ -289,11 +301,12 @@ export default class Util {
289301 id += timestamp . substr ( rand , this . getRandomInt ( 0 , timestamp . length - rand ) ) ;
290302 }
291303 }
292-
293304 return id ;
294305 }
295306
296307 static generateUID ( options ) {
308+ console . time ( "util.js:generateUID duration" ) ;
309+
297310 var uid = '' ;
298311 if ( typeof options === 'object' ) {
299312 if ( this . isset ( options . unique , 'boolean' ) && options . unique && this . isset ( options . tester , 'function' ) ) {
@@ -314,13 +327,15 @@ export default class Util {
314327 uid = this . _gen ( ) ;
315328 }
316329
330+ console . timeEnd ( "util.js:generateUID duration" ) ;
317331 return uid ;
318332 }
319333
320334 static getRandomInt ( min , max ) {
321335 var min = Math . ceil ( min ) ;
322336 var max = Math . floor ( max ) ;
323- return Math . floor ( Math . random ( ) * ( max - min ) ) + min ;
337+ var temp = Math . floor ( Math . random ( ) * ( max - min ) ) + min ;
338+ return ;
324339 }
325340
326341 static getPackageVersion ( ) {
0 commit comments