Subversion Repositories DevTools

Rev

Rev 6577 | Rev 6592 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6577 Rev 6589
Line 345... Line 345...
345
        )
345
        )
346
        .on("dblclick", myClipHandler);
346
        .on("dblclick", myClipHandler);
347
 
347
 
348
});
348
});
349
 
349
 
-
 
350
// Copy text to clipboard
-
 
351
function vixTextToClipBoard(txt, options){
-
 
352
    if ( txt == null ) {
-
 
353
        return;
-
 
354
    }
-
 
355
    var opts  = {
-
 
356
        note : "Data copied to Clipboard",
-
 
357
        title: "Notification",
-
 
358
        notify : true,
-
 
359
        timeout : 100,
-
 
360
        duration: 2000,
-
 
361
    }
-
 
362
    $.extend(opts, options);
-
 
363
 
-
 
364
    var $temp = $("<textarea>");
-
 
365
    $("body").append($temp);
-
 
366
    $temp.val(txt).select();
-
 
367
    document.execCommand("copy");
-
 
368
    $temp.remove();
-
 
369
 
-
 
370
    if ( opts.notify ) {
-
 
371
        vixConfirm(opts.note, {
-
 
372
            title: opts.title,
-
 
373
            icon : "images/i_info.png", 
-
 
374
            cancel: false, 
-
 
375
            button: null,
-
 
376
            timeout : opts.timeout,
-
 
377
            position : 'center', 
-
 
378
            modal : false,
-
 
379
            minHeight: 10, 
-
 
380
            hide: { effect: 'fade', duration: opts.duration }
-
 
381
            });
-
 
382
 
-
 
383
    }
-
 
384
}
-
 
385
 
-
 
386
 
350
 
387
 
351
 
388
 
352
 
389