2018-05-16 00:53:27 +00:00
|
|
|
/* eslint-disable no-var */
|
|
|
|
/* globals $, svgEditor, svgedit, svgCanvas, DOMParser */
|
2010-07-14 18:05:03 +00:00
|
|
|
/*
|
|
|
|
* ext-imagelib.js
|
|
|
|
*
|
2012-09-16 18:53:27 +00:00
|
|
|
* Licensed under the MIT License
|
2010-07-14 18:05:03 +00:00
|
|
|
*
|
|
|
|
* Copyright(c) 2010 Alexis Deveria
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2018-05-16 00:53:27 +00:00
|
|
|
svgEditor.addExtension('imagelib', function () {
|
|
|
|
'use strict';
|
2010-07-14 18:05:03 +00:00
|
|
|
|
2011-01-03 18:45:36 +00:00
|
|
|
var uiStrings = svgEditor.uiStrings;
|
2013-02-16 15:02:26 +00:00
|
|
|
|
2011-01-04 21:12:00 +00:00
|
|
|
$.extend(uiStrings, {
|
|
|
|
imagelib: {
|
|
|
|
select_lib: 'Select an image library',
|
|
|
|
show_list: 'Show library list',
|
|
|
|
import_single: 'Import single',
|
|
|
|
import_multi: 'Import multiple',
|
|
|
|
open: 'Open as new document'
|
|
|
|
}
|
|
|
|
});
|
2011-01-03 18:45:36 +00:00
|
|
|
|
2018-05-16 00:53:27 +00:00
|
|
|
var imgLibs = [
|
|
|
|
{
|
2010-07-14 18:05:03 +00:00
|
|
|
name: 'Demo library (local)',
|
2014-02-12 03:48:48 +00:00
|
|
|
url: svgEditor.curConfig.extPath + 'imagelib/index.html',
|
2010-07-14 18:05:03 +00:00
|
|
|
description: 'Demonstration library for SVG-edit on this server'
|
2013-02-16 15:02:26 +00:00
|
|
|
},
|
2010-07-14 18:05:03 +00:00
|
|
|
{
|
2010-07-16 16:05:00 +00:00
|
|
|
name: 'IAN Symbol Libraries',
|
2015-12-02 06:15:28 +00:00
|
|
|
url: 'https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php',
|
2010-08-16 17:53:15 +00:00
|
|
|
description: 'Free library of illustrations'
|
2014-05-22 03:00:00 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Openclipart',
|
2015-12-02 06:15:28 +00:00
|
|
|
url: 'https://openclipart.org/svgedit',
|
2014-05-22 03:00:00 +00:00
|
|
|
description: 'Share and Use Images. Over 50,000 Public Domain SVG Images and Growing.'
|
|
|
|
}
|
2010-07-14 18:05:03 +00:00
|
|
|
];
|
|
|
|
|
2018-05-16 00:53:27 +00:00
|
|
|
function closeBrowser () {
|
2010-07-14 18:05:03 +00:00
|
|
|
$('#imgbrowse_holder').hide();
|
|
|
|
}
|
2013-02-16 15:02:26 +00:00
|
|
|
|
2018-05-16 00:53:27 +00:00
|
|
|
function importImage (url) {
|
2010-07-16 18:33:48 +00:00
|
|
|
var newImage = svgCanvas.addSvgElementFromJson({
|
2018-05-16 00:53:27 +00:00
|
|
|
'element': 'image',
|
|
|
|
'attr': {
|
|
|
|
'x': 0,
|
|
|
|
'y': 0,
|
|
|
|
'width': 0,
|
|
|
|
'height': 0,
|
|
|
|
'id': svgCanvas.getNextId(),
|
|
|
|
'style': 'pointer-events:inherit'
|
2010-07-16 18:33:48 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
svgCanvas.clearSelection();
|
|
|
|
svgCanvas.addToSelection([newImage]);
|
|
|
|
svgCanvas.setImageURL(url);
|
|
|
|
}
|
2010-07-14 18:05:03 +00:00
|
|
|
|
2010-09-16 20:10:12 +00:00
|
|
|
var mode = 's';
|
2018-05-16 00:53:27 +00:00
|
|
|
var multiArr = [];
|
|
|
|
var transferStopped = false;
|
2010-09-17 17:13:15 +00:00
|
|
|
var pending = {};
|
2014-02-02 00:34:04 +00:00
|
|
|
var preview, submit;
|
|
|
|
|
2018-05-16 00:53:27 +00:00
|
|
|
window.addEventListener('message', function (evt) {
|
2010-07-14 18:05:03 +00:00
|
|
|
// Receive postMessage data
|
|
|
|
var response = evt.data;
|
2018-05-16 00:53:27 +00:00
|
|
|
|
|
|
|
if (!response || typeof response !== 'string') { // Todo: Should namespace postMessage API for this extension and filter out here
|
2010-09-20 18:55:10 +00:00
|
|
|
// Do nothing
|
2010-07-14 18:05:03 +00:00
|
|
|
return;
|
|
|
|
}
|
2014-02-02 00:34:04 +00:00
|
|
|
try { // This block can be removed if embedAPI moves away from a string to an object (if IE9 support not needed)
|
|
|
|
var res = JSON.parse(response);
|
|
|
|
if (res.namespace) { // Part of embedAPI communications
|
|
|
|
return;
|
|
|
|
}
|
2018-05-16 00:53:27 +00:00
|
|
|
} catch (e) {}
|
|
|
|
|
2010-07-14 18:05:03 +00:00
|
|
|
var char1 = response.charAt(0);
|
2014-02-02 00:34:04 +00:00
|
|
|
var id;
|
2018-05-16 00:53:27 +00:00
|
|
|
var svgStr;
|
|
|
|
var imgStr;
|
|
|
|
|
|
|
|
if (char1 !== '{' && transferStopped) {
|
|
|
|
transferStopped = false;
|
2010-09-17 17:13:15 +00:00
|
|
|
return;
|
|
|
|
}
|
2018-05-16 00:53:27 +00:00
|
|
|
|
|
|
|
if (char1 === '|') {
|
2010-09-17 17:13:15 +00:00
|
|
|
var secondpos = response.indexOf('|', 1);
|
2018-05-16 00:53:27 +00:00
|
|
|
id = response.substr(1, secondpos - 1);
|
|
|
|
response = response.substr(secondpos + 1);
|
2010-09-17 17:13:15 +00:00
|
|
|
char1 = response.charAt(0);
|
|
|
|
}
|
2018-05-16 00:53:27 +00:00
|
|
|
|
2010-09-17 17:13:15 +00:00
|
|
|
// Hide possible transfer dialog box
|
|
|
|
$('#dialog_box').hide();
|
2018-05-16 00:53:27 +00:00
|
|
|
var entry, curMeta;
|
2010-07-14 18:05:03 +00:00
|
|
|
switch (char1) {
|
2018-05-16 00:53:27 +00:00
|
|
|
case '{':
|
|
|
|
// Metadata
|
|
|
|
transferStopped = false;
|
|
|
|
curMeta = JSON.parse(response);
|
|
|
|
|
|
|
|
pending[curMeta.id] = curMeta;
|
|
|
|
|
|
|
|
var name = (curMeta.name || 'file');
|
|
|
|
|
|
|
|
var message = uiStrings.notification.retrieving.replace('%s', name);
|
|
|
|
|
|
|
|
if (mode !== 'm') {
|
|
|
|
$.process_cancel(message, function () {
|
|
|
|
transferStopped = true;
|
|
|
|
// Should a message be sent back to the frame?
|
|
|
|
|
|
|
|
$('#dialog_box').hide();
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
entry = $('<div>' + message + '</div>').data('id', curMeta.id);
|
|
|
|
preview.append(entry);
|
|
|
|
curMeta.entry = entry;
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
case '<':
|
|
|
|
svgStr = true;
|
|
|
|
break;
|
|
|
|
case 'd':
|
|
|
|
if (response.indexOf('data:image/svg+xml') === 0) {
|
|
|
|
var pre = 'data:image/svg+xml;base64,';
|
|
|
|
var src = response.substring(pre.length);
|
|
|
|
response = svgedit.utilities.decode64(src);
|
|
|
|
svgStr = true;
|
2010-07-14 18:05:03 +00:00
|
|
|
break;
|
2018-05-16 00:53:27 +00:00
|
|
|
} else if (response.indexOf('data:image/') === 0) {
|
|
|
|
imgStr = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
// Else fall through
|
|
|
|
default:
|
|
|
|
// TODO: See if there's a way to base64 encode the binary data stream
|
|
|
|
// var str = 'data:;base64,' + svgedit.utilities.encode64(response, true);
|
|
|
|
|
|
|
|
// Assume it's raw image data
|
|
|
|
// importImage(str);
|
|
|
|
|
|
|
|
// Don't give warning as postMessage may have been used by something else
|
|
|
|
if (mode !== 'm') {
|
|
|
|
closeBrowser();
|
|
|
|
} else {
|
|
|
|
pending[id].entry.remove();
|
|
|
|
}
|
|
|
|
// $.alert('Unexpected data was returned: ' + response, function() {
|
|
|
|
// if (mode !== 'm') {
|
|
|
|
// closeBrowser();
|
|
|
|
// } else {
|
|
|
|
// pending[id].entry.remove();
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
return;
|
2010-07-14 18:05:03 +00:00
|
|
|
}
|
2018-05-16 00:53:27 +00:00
|
|
|
|
2010-09-16 20:10:12 +00:00
|
|
|
switch (mode) {
|
2018-05-16 00:53:27 +00:00
|
|
|
case 's':
|
|
|
|
// Import one
|
|
|
|
if (svgStr) {
|
|
|
|
svgCanvas.importSvgString(response);
|
|
|
|
} else if (imgStr) {
|
|
|
|
importImage(response);
|
|
|
|
}
|
|
|
|
closeBrowser();
|
|
|
|
break;
|
|
|
|
case 'm':
|
|
|
|
// Import multiple
|
|
|
|
multiArr.push([(svgStr ? 'svg' : 'img'), response]);
|
|
|
|
var title;
|
|
|
|
curMeta = pending[id];
|
|
|
|
if (svgStr) {
|
|
|
|
if (curMeta && curMeta.name) {
|
|
|
|
title = curMeta.name;
|
|
|
|
} else {
|
|
|
|
// Try to find a title
|
|
|
|
var xml = new DOMParser().parseFromString(response, 'text/xml').documentElement;
|
|
|
|
title = $(xml).children('title').first().text() || '(SVG #' + response.length + ')';
|
2010-09-16 20:10:12 +00:00
|
|
|
}
|
2018-05-16 00:53:27 +00:00
|
|
|
if (curMeta) {
|
|
|
|
preview.children().each(function () {
|
|
|
|
if ($(this).data('id') === id) {
|
|
|
|
if (curMeta.preview_url) {
|
|
|
|
$(this).html('<img src="' + curMeta.preview_url + '">' + title);
|
|
|
|
} else {
|
|
|
|
$(this).text(title);
|
2010-09-17 17:13:15 +00:00
|
|
|
}
|
2018-05-16 00:53:27 +00:00
|
|
|
submit.removeAttr('disabled');
|
|
|
|
}
|
|
|
|
});
|
2010-09-16 20:10:12 +00:00
|
|
|
} else {
|
2018-05-16 00:53:27 +00:00
|
|
|
preview.append('<div>' + title + '</div>');
|
|
|
|
submit.removeAttr('disabled');
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (curMeta && curMeta.preview_url) {
|
|
|
|
title = curMeta.name || '';
|
|
|
|
}
|
|
|
|
if (curMeta && curMeta.preview_url) {
|
|
|
|
entry = '<img src="' + curMeta.preview_url + '">' + title;
|
|
|
|
} else {
|
|
|
|
entry = '<img src="' + response + '">';
|
|
|
|
}
|
2010-09-17 17:13:15 +00:00
|
|
|
|
2018-05-16 00:53:27 +00:00
|
|
|
if (curMeta) {
|
|
|
|
preview.children().each(function () {
|
|
|
|
if ($(this).data('id') === id) {
|
|
|
|
$(this).html(entry);
|
|
|
|
submit.removeAttr('disabled');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
preview.append($('<div>').append(entry));
|
|
|
|
submit.removeAttr('disabled');
|
2010-09-16 20:10:12 +00:00
|
|
|
}
|
2018-05-16 00:53:27 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 'o':
|
|
|
|
// Open
|
|
|
|
if (!svgStr) { break; }
|
|
|
|
svgEditor.openPrep(function (ok) {
|
|
|
|
if (!ok) { return; }
|
|
|
|
svgCanvas.clear();
|
|
|
|
svgCanvas.setSvgString(response);
|
|
|
|
// updateCanvas();
|
|
|
|
});
|
|
|
|
closeBrowser();
|
|
|
|
break;
|
2010-09-16 20:10:12 +00:00
|
|
|
}
|
2010-07-14 18:05:03 +00:00
|
|
|
}, true);
|
2010-09-16 20:10:12 +00:00
|
|
|
|
2018-05-16 00:53:27 +00:00
|
|
|
function toggleMulti (show) {
|
2010-09-16 20:10:12 +00:00
|
|
|
$('#lib_framewrap, #imglib_opts').css({right: (show ? 200 : 10)});
|
2014-02-02 00:34:04 +00:00
|
|
|
if (!preview) {
|
2010-09-16 20:10:12 +00:00
|
|
|
preview = $('<div id=imglib_preview>').css({
|
|
|
|
position: 'absolute',
|
|
|
|
top: 45,
|
|
|
|
right: 10,
|
|
|
|
width: 180,
|
|
|
|
bottom: 45,
|
|
|
|
background: '#fff',
|
|
|
|
overflow: 'auto'
|
|
|
|
}).insertAfter('#lib_framewrap');
|
2018-05-16 00:53:27 +00:00
|
|
|
|
2012-11-13 11:01:07 +00:00
|
|
|
submit = $('<button disabled>Import selected</button>')
|
|
|
|
.appendTo('#imgbrowse')
|
2018-05-16 00:53:27 +00:00
|
|
|
.on('click touchend', function () {
|
|
|
|
$.each(multiArr, function (i) {
|
|
|
|
var type = this[0];
|
|
|
|
var data = this[1];
|
|
|
|
if (type === 'svg') {
|
|
|
|
svgCanvas.importSvgString(data);
|
|
|
|
} else {
|
|
|
|
importImage(data);
|
|
|
|
}
|
|
|
|
svgCanvas.moveSelectedElements(i * 20, i * 20, false);
|
|
|
|
});
|
|
|
|
preview.empty();
|
|
|
|
multiArr = [];
|
|
|
|
$('#imgbrowse_holder').hide();
|
|
|
|
}).css({
|
|
|
|
position: 'absolute',
|
|
|
|
bottom: 10,
|
|
|
|
right: -10
|
2010-09-16 20:10:12 +00:00
|
|
|
});
|
|
|
|
}
|
2018-05-16 00:53:27 +00:00
|
|
|
|
2010-09-16 20:10:12 +00:00
|
|
|
preview.toggle(show);
|
2010-09-29 20:32:28 +00:00
|
|
|
submit.toggle(show);
|
2010-09-16 20:10:12 +00:00
|
|
|
}
|
2010-07-14 18:05:03 +00:00
|
|
|
|
2018-05-16 00:53:27 +00:00
|
|
|
function showBrowser () {
|
2010-07-14 18:05:03 +00:00
|
|
|
var browser = $('#imgbrowse');
|
2014-02-02 00:34:04 +00:00
|
|
|
if (!browser.length) {
|
2018-05-16 00:53:27 +00:00
|
|
|
$('<div id=imgbrowse_holder><div id=imgbrowse class=toolbar_button>' +
|
|
|
|
'</div></div>').insertAfter('#svg_docprops');
|
2010-07-14 18:05:03 +00:00
|
|
|
browser = $('#imgbrowse');
|
|
|
|
|
2018-05-16 00:53:27 +00:00
|
|
|
var allLibs = uiStrings.imagelib.select_lib;
|
2010-07-14 18:05:03 +00:00
|
|
|
|
2018-05-16 00:53:27 +00:00
|
|
|
var libOpts = $('<ul id=imglib_opts>').appendTo(browser);
|
2010-09-16 20:10:12 +00:00
|
|
|
var frame = $('<iframe/>').prependTo(browser).hide().wrap('<div id=lib_framewrap>');
|
2018-05-16 00:53:27 +00:00
|
|
|
|
|
|
|
var header = $('<h1>').prependTo(browser).text(allLibs).css({
|
2010-09-16 20:10:12 +00:00
|
|
|
position: 'absolute',
|
|
|
|
top: 0,
|
|
|
|
left: 0,
|
|
|
|
width: '100%'
|
|
|
|
});
|
2018-05-16 00:53:27 +00:00
|
|
|
|
2012-11-13 11:01:07 +00:00
|
|
|
var cancel = $('<button>' + uiStrings.common.cancel + '</button>')
|
|
|
|
.appendTo(browser)
|
2018-05-16 00:53:27 +00:00
|
|
|
.on('click touchend', function () {
|
|
|
|
$('#imgbrowse_holder').hide();
|
|
|
|
}).css({
|
|
|
|
position: 'absolute',
|
|
|
|
top: 5,
|
|
|
|
right: -10
|
|
|
|
});
|
|
|
|
|
|
|
|
var leftBlock = $('<span>').css({position: 'absolute', top: 5, left: 10}).appendTo(browser);
|
|
|
|
|
2012-11-13 11:01:07 +00:00
|
|
|
var back = $('<button hidden>' + uiStrings.imagelib.show_list + '</button>')
|
|
|
|
.appendTo(leftBlock)
|
2018-05-16 00:53:27 +00:00
|
|
|
.on('click touchend', function () {
|
|
|
|
frame.attr('src', 'about:blank').hide();
|
|
|
|
libOpts.show();
|
|
|
|
header.text(allLibs);
|
|
|
|
back.hide();
|
|
|
|
}).css({
|
|
|
|
'margin-right': 5
|
|
|
|
}).hide();
|
|
|
|
|
|
|
|
/* var type = */ $('<select><option value=s>' +
|
|
|
|
uiStrings.imagelib.import_single + '</option><option value=m>' +
|
|
|
|
uiStrings.imagelib.import_multi + '</option><option value=o>' +
|
|
|
|
uiStrings.imagelib.open + '</option></select>').appendTo(leftBlock).change(function () {
|
2010-09-16 20:10:12 +00:00
|
|
|
mode = $(this).val();
|
|
|
|
switch (mode) {
|
2018-05-16 00:53:27 +00:00
|
|
|
case 's':
|
|
|
|
case 'o':
|
|
|
|
toggleMulti(false);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'm':
|
|
|
|
// Import multiple
|
|
|
|
toggleMulti(true);
|
|
|
|
break;
|
2010-09-16 20:10:12 +00:00
|
|
|
}
|
|
|
|
}).css({
|
|
|
|
'margin-top': 10
|
2010-07-14 18:05:03 +00:00
|
|
|
});
|
2018-05-16 00:53:27 +00:00
|
|
|
|
2010-08-31 20:31:58 +00:00
|
|
|
cancel.prepend($.getSvgIcon('cancel', true));
|
|
|
|
back.prepend($.getSvgIcon('tool_imagelib', true));
|
2018-05-16 00:53:27 +00:00
|
|
|
|
|
|
|
$.each(imgLibs, function (i, opts) {
|
2012-11-13 11:01:07 +00:00
|
|
|
$('<li>')
|
2018-05-16 00:53:27 +00:00
|
|
|
.appendTo(libOpts)
|
2012-11-13 11:01:07 +00:00
|
|
|
.text(opts.name)
|
2018-05-16 00:53:27 +00:00
|
|
|
.on('click touchend', function () {
|
|
|
|
frame.attr('src', opts.url).show();
|
|
|
|
header.text(opts.name);
|
|
|
|
libOpts.hide();
|
|
|
|
back.show();
|
|
|
|
}).append('<span>' + opts.description + '</span>');
|
2010-07-14 18:05:03 +00:00
|
|
|
});
|
|
|
|
} else {
|
|
|
|
$('#imgbrowse_holder').show();
|
|
|
|
}
|
|
|
|
}
|
2018-05-16 00:53:27 +00:00
|
|
|
|
2010-07-14 18:05:03 +00:00
|
|
|
return {
|
2018-05-16 00:53:27 +00:00
|
|
|
svgicons: svgEditor.curConfig.extPath + 'ext-imagelib.xml',
|
2010-07-14 18:05:03 +00:00
|
|
|
buttons: [{
|
2018-05-16 00:53:27 +00:00
|
|
|
id: 'tool_imagelib',
|
|
|
|
type: 'app_menu', // _flyout
|
2010-07-14 18:05:03 +00:00
|
|
|
position: 4,
|
2018-05-16 00:53:27 +00:00
|
|
|
title: 'Image library',
|
2010-07-14 18:05:03 +00:00
|
|
|
events: {
|
2018-05-16 00:53:27 +00:00
|
|
|
'mouseup': showBrowser
|
2010-07-14 18:05:03 +00:00
|
|
|
}
|
|
|
|
}],
|
2018-05-16 00:53:27 +00:00
|
|
|
callback: function () {
|
|
|
|
$('<style>').text(
|
|
|
|
'#imgbrowse_holder {' +
|
|
|
|
'position: absolute;' +
|
|
|
|
'top: 0;' +
|
|
|
|
'left: 0;' +
|
|
|
|
'width: 100%;' +
|
|
|
|
'height: 100%;' +
|
|
|
|
'background-color: rgba(0, 0, 0, .5);' +
|
|
|
|
'z-index: 5;' +
|
|
|
|
'}' +
|
|
|
|
'#imgbrowse {' +
|
|
|
|
'position: absolute;' +
|
|
|
|
'top: 25px;' +
|
|
|
|
'left: 25px;' +
|
|
|
|
'right: 25px;' +
|
|
|
|
'bottom: 25px;' +
|
|
|
|
'min-width: 300px;' +
|
|
|
|
'min-height: 200px;' +
|
|
|
|
'background: #B0B0B0;' +
|
|
|
|
'border: 1px outset #777;' +
|
|
|
|
'}' +
|
|
|
|
'#imgbrowse h1 {' +
|
|
|
|
'font-size: 20px;' +
|
|
|
|
'margin: .4em;' +
|
|
|
|
'text-align: center;' +
|
|
|
|
'}' +
|
|
|
|
'#lib_framewrap,' +
|
|
|
|
'#imgbrowse > ul {' +
|
|
|
|
'position: absolute;' +
|
|
|
|
'top: 45px;' +
|
|
|
|
'left: 10px;' +
|
|
|
|
'right: 10px;' +
|
|
|
|
'bottom: 10px;' +
|
|
|
|
'background: white;' +
|
|
|
|
'margin: 0;' +
|
|
|
|
'padding: 0;' +
|
|
|
|
'}' +
|
|
|
|
'#imgbrowse > ul {' +
|
|
|
|
'overflow: auto;' +
|
|
|
|
'}' +
|
|
|
|
'#imgbrowse > div {' +
|
|
|
|
'border: 1px solid #666;' +
|
|
|
|
'}' +
|
|
|
|
'#imglib_preview > div {' +
|
|
|
|
'padding: 5px;' +
|
|
|
|
'font-size: 12px;' +
|
|
|
|
'}' +
|
|
|
|
'#imglib_preview img {' +
|
|
|
|
'display: block;' +
|
|
|
|
'margin: 0 auto;' +
|
|
|
|
'max-height: 100px;' +
|
|
|
|
'}' +
|
|
|
|
'#imgbrowse li {' +
|
|
|
|
'list-style: none;' +
|
|
|
|
'padding: .5em;' +
|
|
|
|
'background: #E8E8E8;' +
|
|
|
|
'border-bottom: 1px solid #B0B0B0;' +
|
|
|
|
'line-height: 1.2em;' +
|
|
|
|
'font-style: sans-serif;' +
|
|
|
|
'}' +
|
|
|
|
'#imgbrowse li > span {' +
|
|
|
|
'color: #666;' +
|
|
|
|
'font-size: 15px;' +
|
|
|
|
'display: block;' +
|
|
|
|
'}' +
|
|
|
|
'#imgbrowse li:hover {' +
|
|
|
|
'background: #FFC;' +
|
|
|
|
'cursor: pointer;' +
|
|
|
|
'}' +
|
|
|
|
'#imgbrowse iframe {' +
|
|
|
|
'width: 100%;' +
|
|
|
|
'height: 100%;' +
|
|
|
|
'border: 0;' +
|
|
|
|
'}'
|
|
|
|
).appendTo('head');
|
2010-07-14 18:05:03 +00:00
|
|
|
}
|
2014-02-02 00:34:04 +00:00
|
|
|
};
|
2010-07-14 18:05:03 +00:00
|
|
|
});
|