From 893c31e004891701c88ddeb585a925cec32a8f0e Mon Sep 17 00:00:00 2001 From: pepperpepperpepper Date: Wed, 18 Nov 2015 11:57:32 -0800 Subject: the great cleanup, the legend continues --- share/frontend/im/arrow_pointing_left.png | Bin 336 -> 0 bytes share/frontend/im/colors/iframe.js | 25 - share/frontend/im/colors/images/Thumbs.db | Bin 7680 -> 0 bytes share/frontend/im/colors/js/ancient.js | 528 --------------------- share/frontend/im/css/style.css | 170 +++++++ share/frontend/im/gallery_style.css | 51 -- share/frontend/im/imcupbg.jpg | Bin 18738 -> 0 bytes share/frontend/im/img/arrow_pointing_left.png | Bin 0 -> 336 bytes share/frontend/im/img/imcupbg.jpg | Bin 0 -> 18738 bytes share/frontend/im/img/new.gif | Bin 0 -> 144 bytes share/frontend/im/index.html | 322 +------------ share/frontend/im/jquery-ui-1.8.16.custom.min.js | 84 ---- .../frontend/im/js/jquery-ui-1.8.16.custom.min.js | 84 ++++ share/frontend/im/js/main.js | 138 ++++++ share/frontend/im/new.gif | Bin 144 -> 0 bytes 15 files changed, 397 insertions(+), 1005 deletions(-) delete mode 100755 share/frontend/im/arrow_pointing_left.png delete mode 100644 share/frontend/im/colors/iframe.js delete mode 100644 share/frontend/im/colors/images/Thumbs.db delete mode 100644 share/frontend/im/colors/js/ancient.js create mode 100644 share/frontend/im/css/style.css delete mode 100755 share/frontend/im/gallery_style.css delete mode 100755 share/frontend/im/imcupbg.jpg create mode 100755 share/frontend/im/img/arrow_pointing_left.png create mode 100755 share/frontend/im/img/imcupbg.jpg create mode 100755 share/frontend/im/img/new.gif delete mode 100755 share/frontend/im/jquery-ui-1.8.16.custom.min.js create mode 100755 share/frontend/im/js/jquery-ui-1.8.16.custom.min.js create mode 100644 share/frontend/im/js/main.js delete mode 100755 share/frontend/im/new.gif (limited to 'share/frontend/im') diff --git a/share/frontend/im/arrow_pointing_left.png b/share/frontend/im/arrow_pointing_left.png deleted file mode 100755 index ba1fb53..0000000 Binary files a/share/frontend/im/arrow_pointing_left.png and /dev/null differ diff --git a/share/frontend/im/colors/iframe.js b/share/frontend/im/colors/iframe.js deleted file mode 100644 index 4b7d2ac..0000000 --- a/share/frontend/im/colors/iframe.js +++ /dev/null @@ -1,25 +0,0 @@ -$("#lnkcolorbox").click(function() { - $.fancybox.open({ - href : 'colors.htm', - width : 700, // set the width - height : 610, - fitToView : true, - autoDimensions:false, - autoSize:false, - type : 'iframe', - closeBtn : false, - padding : 5, - beforeShow : function(){ - $('.fancybox-iframe').contents().find('#submitvalue').click(function(){ - $('.fancybox-iframe').contents().find('form').submit(); - $.fancybox.close(); - }); - }, - beforeClose : function(){ - x = $('.fancybox-iframe').contents().find('#namespace').val(); - }, - afterClose: function(){ - $('#img-hue').val(x); - } - }); -}); diff --git a/share/frontend/im/colors/images/Thumbs.db b/share/frontend/im/colors/images/Thumbs.db deleted file mode 100644 index ec01f6a..0000000 Binary files a/share/frontend/im/colors/images/Thumbs.db and /dev/null differ diff --git a/share/frontend/im/colors/js/ancient.js b/share/frontend/im/colors/js/ancient.js deleted file mode 100644 index 5bf15c0..0000000 --- a/share/frontend/im/colors/js/ancient.js +++ /dev/null @@ -1,528 +0,0 @@ -var old = {}; -var colorsheight; -var colorswidth; -var widthratio = 7; -var numberacross = 10; -var backgroundstate = 2; -var infostate = 0; -var names = true; -var hexes = false; -var rgbs = false; -var favshow = false; -var selectedname = ""; -var selectedrgb; -var curfavcolor = ""; -var curfavcolorId = ""; -var separate = ';'; -//---------element objects---------- -var transbutton = $('#transbutton'); -var submitvalue = $('#submitvalue'); -var addfav = $('#addfavlist'); -var openfav = $('#openfavlist'); -var preview = $('#preview'); -var colornames = $('#colornames'); -var namespace = $('#namespace'); -var extra = $('#extra'); -var container = $('#container'); -var switches = $('#switches'); -var transparent = $('#transparent'); -var infospace = $('#infospace'); -var infoswitch = $('#infoswitch'); -var backgroundswitch = $('#backgroundswitch'); -var bg_menu = $('#bg_menu'); -var vasebackground = $('#vasebackground'); -var hexswitch = $('#hexswitch'); -var favpanel = $('#favpanel'); -var orgheight = 0; -var bscroll = false; -//---------------------------------- -$(function(){ - ColorPicker.show(); -}); - -function selectfavColor(selcolor, id) -{ - addfav.html('Remove from Favorites'); - curfavcolor = selcolor; - curfavcolorId = id; - var rgbregex = /rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)/; - var hexregex = /^#(?:[0-9a-f]{3}){1,2}$/i; - hexes = false; - names = false; - rgbs = false; - var match = rgbregex.exec(selcolor); - if (match != null) { - selectedname = rgbtoname[selcolor]; - selectedrgb = selcolor; - hexes = true; - hexswitch.html('CLICK TO SWITCH TO HEX VALUES'); - } else if((match = hexregex.exec(selcolor))!= null) { - names = true; - selectedrgb = hextorgb[selcolor]; - selectedname = rgbtoname[selectedrgb]; - hexswitch.html('CLICK TO SWITCH TO COLOR NAMES'); - } else { - selectedname = selcolor; - selectedrgb = hextorgb[nametohex[selectedname]]; - hexswitch.html('CLICK TO SWITCH TO RGB VALUES'); - rgbs = true; - } - colornames.html(selcolor); - namespace.val(selcolor); - preview.css({'background-color':selectedrgb,'border-style':'none'}); - vasebackground.css('background-color',selectedrgb); -} - -var ColorPicker = { - GoldenFuncs: { - regolden: function(num) { - ratio = (1+Math.sqrt(5))/2; - newnum = Math.round(num/ratio); - return newnum; - }, - goldenize: function(num) { - ratio = (1+Math.sqrt(5))/2; - newnum = Math.round(num*ratio); - return newnum; - }, - getproperty: function(idandselectr, propertystr) { - //turns css property width or height into an integer value - grab = $(idandselectr).css(propertystr); - grab = grab.slice(0,-2); - numval = parseInt(grab); - return numval; - }, - makegolden: function(idandselectr, propertystr) { - result = ColorPicker.GoldenFuncs.getproperty(idandselectr, propertystr); - newval = ColorPicker.GoldenFuncs.goldenize(result) + 60; - propval = newval.toString()+'px'; - if(propertystr == 'height') { - $(idandselectr).css('width', propval); - }else if(propertystr == 'width') { - $(idandselectr).css('height', propval); - } - } - }, - Events: { - addEventListener: function(){ - //--------event handler of transparent button------- - transbutton.click(function() { - namespace.val('transparent'); - preview.css({'background-color':'transparent','border-style':'dashed','border-width':'2px'}); - colornames.html('transparent'); - colornames.fadeOut(100); - colornames.fadeIn(500); - extra.html('

note: the .jpg image format does not support transparency'); - }); - transbutton.hover(function(){ transbutton.addClass('hovertrans')}, - function(){ transbutton.attr('class','defaulttrans')}); - submitvalue.hover(function(){ submitvalue.addClass('hovertrans')}, - function(){ submitvalue.attr('class','defaulttrans')}); - addfav.hover(function(){ addfav.addClass('hovertrans')}, - function(){ addfav.attr('class','defaulttrans')}); - $('.bgOptions').click(function(){ - if (this.id == "bg1") - { - $('#colorpicker').css({'background-image':'url("./images/bg.dither.gif")','background-color':'gray','background-color':'black'}); - }else if(this.id == "bg5"){ - $('#' + this.id).bind('keypress', function(event){ - var key = event.which || event.keyCode; - if(key === 13) { - $('#colorpicker').css({'background-image':"url('" + $('#bgURI').val() + "')"}); - $('#opt_bgURI').val($('#bgURI').val()); - $('#bgURI').val(''); - } - }); - }else{ - $('#colorpicker').css({'background-image':'none','background-color':$('#' + this.id).html().toLowerCase()}); - } - $('#opt_bgColor').val(this.id); - }); - //--------event handler over colorpanel------- - var firstwidth; - $('.colors').mouseover(function() { - extra.html(""); - if(this.id != 'd0') { - $(this).css({'height':ColorPicker.GoldenFuncs.goldenize(colorsheight), - 'width':ColorPicker.GoldenFuncs.goldenize(colorswidth)}); - firstwidth = container.css('width'); - newwidth = firstwidth+ColorPicker.GoldenFuncs.goldenize(colorswidth)-colorswidth; - container.css('width',newwidth); - } - }); - $('.colors').mouseout(function() { - $(this).css('height',colorsheight) - $(this).css('width', colorswidth) - container.css('width',firstwidth) - }); - $('.colors').hover(function() { - var stringvalue = 'CLICK TO CHOOSE THE COLOR'; - colornames.fadeOut(100); - colornames.fadeIn(500); - stringvalue = ColorPicker.showcolorname(this.id); - colornames.html(stringvalue); - }); - $('.colors').click(function() { - selectednameid = $(this).attr('id') - selectedname = divtoname['#'+selectednameid]; - selectedrgb = $(this).css('background-color'); - ColorPicker.putitin(); - }); - //-------------others handler------------------------------- - infoswitch.hover(function(){infospace.show()}, function(){infospace.hide('slow')} ); - infoswitch.click(function(){ColorPicker.switchcolorinfo()}); - backgroundswitch.clicked = false; - backgroundswitch.click(function(){ - if (! backgroundswitch.clicked){ - bg_menu.slideDown("fast", function(){ - backgroundswitch.clicked = true; - backgroundswitch.addClass("switches_depressed"); - }); - }else{ - bg_menu.slideUp("fast", function(){ - backgroundswitch.clicked = false; - backgroundswitch.removeClass("switches_depressed"); - }) - } - }); - addfav.click(function(){ColorPicker.addfavourites()}); - openfav.click(function(){ColorPicker.openfavourites()}); - hexswitch.click(function(){ColorPicker.hexcolorswitch()}); - $('.theswitches').hover(function(){ ColorPicker.switchhovercss(this.id, 'over') }, - function(){ ColorPicker.switchhovercss(this.id, 'out') }); - //-------handler for window resive---- - $(window).resize(function() - { - ColorPicker.setupdimensions(); - }); - } - }, - getcolorfromfavorite: function(fvalue){ - var rgbregex = /rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)/; - var hexregex = /^#(?:[0-9a-f]{3}){1,2}$/i; - var retcolor = ''; - var match = rgbregex.exec(fvalue); - if (match != null) { - retcolor = fvalue; - } else if((match = hexregex.exec(fvalue))!= null) { - retcolor = hextorgb[fvalue]; - } else { - retcolor = hextorgb[nametohex[fvalue]]; - } - return retcolor; - }, - initfavpanel: function(){ - var fcolors = $('#favcolors').val(); - var clist=fcolors.split(separate); - for(var i=0; i < clist.length; i++) { - if (clist[i] != '') - { - var colname = clist[i]; - favpanel.append(' '); - } - } - }, - existsfavcolor: function(fcolor) { - var fcolors = $('#favcolors').val(); - var clist=fcolors.split(separate); - for(var i=0; i < clist.length; i++) { - if (clist[i] == fcolor) - { - return i; - } - } - return -1; - }, - setpaneldimension: function(){ - var fcolors = $('#favcolors').val(); - var clist=fcolors.split(separate); - }, - addfavourites: function() { - var fcolors = $('#favcolors').val(); - - if (curfavcolor != '') { - var clist=fcolors.split(separate); - var index = ColorPicker.existsfavcolor(curfavcolor); - if(index != 0 && index == clist.length - 1) - { - fcolors = fcolors.replace(separate + curfavcolor, ''); - }else if(clist.length == 1) { - fcolors = fcolors.replace(curfavcolor, ''); - }else{ - fcolors = fcolors.replace(curfavcolor+ separate, ''); - } - $('#' + curfavcolorId).remove(); - addfav.html('Add to Favorites'); - curfavcolor = ""; - curfavcolorId = ""; - $('#favnone').attr('checked','checked'); - if (fcolors == '') - { - favpanel.hide(); - favshow = false; - openfav.attr('class','defaulttrans'); - } - }else { - if (ColorPicker.existsfavcolor(namespace.val()) == -1) - { - if (fcolors.length > 0) { - fcolors = fcolors + separate + namespace.val(); - }else { - fcolors = namespace.val(); - } - var colname = namespace.val(); - var clist=fcolors.split(separate); - var id = clist.length - 1; - $('#favmsg').remove(); - favpanel.append(' '); - } - } - $('#favcolors').val(fcolors); - ColorPicker.setpaneldimension(); - }, - openfavourites: function() { - if (favshow) { - favpanel.hide(); - openfav.attr('class','defaulttrans'); - favshow = false; - $('#favmsg').remove(); - bscroll = false; - }else { - favpanel.show(); - openfav.addClass('hovertrans'); - favshow = true; - var fcolors = $('#favcolors').val(); - if(fcolors == '') { - favpanel.append('No favourite colors.'); - } - bscroll = true; - ColorPicker.setpaneldimension(); - } - addfav.html('Add to Favorites'); - curfavcolor = ""; - curfavcolorId = ""; - $('.favcolor input[type=radio]').attr('checked',false); - }, - loadColorStorage: function() { - var opts = $('#opt_hexswitch').val(); - names = false; - rgbs = false; - hexes = false; - if(opts == 'names') { - selectedname = namespace.val(); - selectedrgb = hextorgb[nametohex[selectedname]]; - hexswitch.html('CLICK TO SWITCH TO RGB VALUES'); - rgbs = true; - }else if(opts == 'rgbs') { - selectedname = rgbtoname[namespace.val()]; - selectedrgb = namespace.val(); - hexes = true; - hexswitch.html('CLICK TO SWITCH TO HEX VALUES') - }else if(opts == 'hexes') { - names = true; - selectedrgb = hextorgb[namespace.val()]; - selectedname = rgbtoname[selectedrgb]; - hexswitch.html('CLICK TO SWITCH TO COLOR NAMES'); - } - colornames.html(selectedname); - preview.css({'background-color':selectedrgb,'border-style':'none'}); - vasebackground.css('background-color',selectedrgb); - infostate = parseInt($('#opt_infoswitch').val()); - ColorPicker.switchcolorinfo(); - var bgOpt = $('#opt_bgColor').val(); - if (bgOpt == "bg1") - { - $('#colorpicker').css({'background-image':'url("./images/bg.dither.gif")','background-color':'gray','background-color':'black'}); - }else if(bgOpt == "bg5"){ - $('#colorpicker').css({'background-image':"url('" + $('#opt_bgURI').val() + "')"}); - }else{ - $('#colorpicker').css({'background-image':'none','background-color':$('#' + bgOpt).html()}); - } - $('#bgURI').val($('#opt_bgURI').val()); - ColorPicker.initfavpanel(); - }, - switchhovercss: function(sel, uno) { - var chng = {}; - chng['color'] = 'white'; - chng['text-shadow'] = 'black 1px 2px'; - chng['background-image'] = "url('./images/hoverbackground.jpg')"; - if(uno == 'over') { - for(var key in chng) { - old[key] = $('#'+sel).css(key); - } - for(var key in chng){ - $('#'+sel).css(key, chng[key]); - } - }else if(uno == 'out') { - for(var key in old){ - $('#'+sel).css(key, old[key]); - } - } - }, - showcolorname: function(divstr) { - var rgb = $('#'+divstr).css('background-color'); - var colorname = divtoname['#'+divstr]; - var imname = colorname; - if (hexes === true) { - imname = rgb; - }else if(rgbs === true) { - imname = colorname; - }else if (names === true) { - imname = rgbtohex[rgb]; - } - return imname; - }, - hexcolorswitch: function() { - if(names == true) { - hexes = false; - rgbs = false; - hexswitch.html('CLICK TO SWITCH TO RGB VALUES'); - namespace.val(selectedname); - names = false; - rgbs = true; - $('#opt_hexswitch').val('names'); - }else if(hexes == true) { - rgbs = false; - names = false; - hexswitch.html('CLICK TO SWITCH TO COLOR NAMES'); - namespace.val(rgbtohex[selectedrgb]); - hexes = false; - names = true; - $('#opt_hexswitch').val('hexes'); - }else if(rgbs == true) { - names = false; - hexes = false; - hexswitch.html('CLICK TO SWITCH TO HEX VALUES') - namespace.val(selectedrgb) - rgbs = false; - hexes = true; - $('#opt_hexswitch').val('rgbs'); - } - }, - putitin: function() { - if (rgbs === true) { thecolor = selectedname; } - if (hexes === true) { thecolor = selectedrgb; } - if (names === true) { thecolor = rgbtohex[selectedrgb]; } - namespace.val(thecolor); - preview.css({'background-color':selectedrgb,'border-style':'none'}); - vasebackground.css('background-color',selectedrgb); - }, - getcontainerwidth: function () { - basis = $('.colors').css('width'); - basis = parseInt(basis.slice(0,-2)); - secondbasis = '2px'; - secondbasis = parseInt(secondbasis.slice(0,-2)); - widthval = (secondbasis*(numberacross*2))+(basis*numberacross)+(basis*.44);//(goldenize(basis)-basis) - if (widthval < 406){ - widthval = 406; - } - widthval = widthval.toString()+'px'; - return widthval; - }, - shrinkwidth: function(arg, ratio) { - for(var i=0; i < ratio; i++) { - arg = ColorPicker.GoldenFuncs.regolden(arg); - } - division = Math.round(arg); - return division; - }, - setupfonts: function () { - fontratioone = ColorPicker.shrinkwidth(windowWidth, 9); - $('.theswitches').css('font-size',fontratioone); - fontratiotwo = ColorPicker.shrinkwidth(windowWidth, 8); - $('.subtitle').css('font-size',fontratiotwo); - colornames.css('font-size', ColorPicker.GoldenFuncs.goldenize(fontratiotwo)+'px'); - colornames.css('text-shadow', 'black 1px 2px'); - var transfont = ColorPicker.GoldenFuncs.regolden(fontratioone); - $('.smalltitle').css({'width':'100%','font-size':fontratioone}); - }, - setupsides: function() { - container.css({'position':'relative','z-index':'1'}); - switches.css('z-index','10'); - var basis = container.css('width'); - basis = parseInt(basis.slice(0,-2)); - remainder = (100-basis)/2; - widths = ColorPicker.GoldenFuncs.regolden(basis); - widths = widths.toString()+'px'; - lateralbasis = ColorPicker.GoldenFuncs.regolden(remainder); - leftside = toString(lateralbasis)+'%'; - rightside = toString(100-lateralbasis)+'%'; - colornames.css('left', leftside); - switches.css({'width': widths, 'left': rightside}); - }, - previewdimensions: function() { - first = switches.css('width'); - first = parseInt(first.slice(0,-2)); - width = ColorPicker.GoldenFuncs.regolden(first); - height = ColorPicker.GoldenFuncs.regolden(width); - width = width.toString()+'px'; - height = height.toString()+'px'; - preview.css({'width':width, 'height':height}); - }, - setupdimensions: function() { - if(window.innerWidth > 933) { - windowWidth = window.innerWidth - }else{ windowWidth = 933 } - colorswidth = ColorPicker.shrinkwidth(windowWidth, widthratio); - $('.colors').css('width', colorswidth.toString()+'px'); - colorsheight = ColorPicker.GoldenFuncs.regolden(colorswidth); - propval = colorsheight.toString()+'px'; - $('.colors').css('height', propval); - var containerwidth = ColorPicker.getcontainerwidth(); - container.css('width',containerwidth); - - ColorPicker.setupfonts(); - ColorPicker.setupsides(); - ColorPicker.GoldenFuncs.makegolden('#' + switches.attr('id'),'width'); - ColorPicker.previewdimensions(); - transparent.css({'float':'bottom','width':'inherit'}); - orgheight = switches.height(); - }, - switchcolorinfo: function() { - if(infostate == 1) { - for(var i=0; i < color_values.length; i++) { - $('#d' + i).html(divtoname['#d' + i]); - } - infostate = 2; - infospace.html('(NAMES)'); - $('#opt_infoswitch').val('1'); - }else if(infostate == 0) { - $('.colors').html(""); - infostate = 1; - infospace.html('(NONE)'); - $('#opt_infoswitch').val('0'); - }else if(infostate == 2) { - for(var i=0; i < color_values.length; i++) { - $('#d' + i).html(nametohex[divtoname['#d' + i]]); - } - infostate = 3; - infospace.html('(HEXES)'); - $('#opt_infoswitch').val('2'); - }else if(infostate == 3) { - for(var i=0; i < color_values.length; i++) { - $('#d' + i).html(hextorgb[nametohex[divtoname['#d' + i]]]); - } - infostate = 0; - infospace.html('(RGBS)'); - $('#opt_infoswitch').val('3'); - } - }, - show: function() { - //-------create color panel-------- - for (i=1; i < color_values.length ; i++) - { - $('#d0').attr('style','background-color:' + color_values[0]); - var colorbox = $('#d0').clone(); - colorbox.attr('id','d' + i); - colorbox.attr('style','background-color:' + color_values[i]); - container.append(colorbox); - } - //--------initialize------------ - ColorPicker.setupdimensions(); - ColorPicker.switchcolorinfo(); - ColorPicker.hexcolorswitch(); - ColorPicker.Events.addEventListener(); - }, -} diff --git a/share/frontend/im/css/style.css b/share/frontend/im/css/style.css new file mode 100644 index 0000000..3f0e597 --- /dev/null +++ b/share/frontend/im/css/style.css @@ -0,0 +1,170 @@ +* + { + padding: 0; + margin: 0; + font-family: sans-serif; + } +body + { + background-color: #efedee; + // background-color: #838388; + color: #555; + } +#down_for_maintenance{ + position: absolute; + background: url("http://asdf.us/impattern/patterns/38.png"); + z-index:2000; + height: 100%; + width: 100%; + top: 0; + left:0; + display: none; +} +#down_for_maintenance > span{ + background: white; +} +#controls,#result + { + display: inline-block; + margin: 10px; + width: 430px; + float: left; + } +#controls + { + font-size: 14px; + top: 0; left: 0; + z-index: 5; + } +#result + { + background-color: #d6d0d0; +// background-color: #131412; + margin-left: 20px; + padding: 10px; + display: none; + z-index: 5; + } +#sendtoinput + { + font-size: 10px; + } +#instructions + { + position: absolute; + bottom: 10px; + left: 10px; + line-height: 18px; + z-index: 1; + } +p,form + { +// background-color: #010101; + background-color: #fff; + background-position: center center; + padding: 10px; + font-size: 14px; + width: 430px; + display: block; + } +#gallery-link + { + background-color: #fff; +// background-image: url(imcupbg.jpg); + background-position: center center; + position: absolute; + top: 10px; + right: 10px; + padding: 10px; + z-index: 10; + } +.error + { + color: red; + font-size: 20px; + } +a + { +// color: #b4d; + color: #a39; + font-weight: bold; + } +label + { + display: inline-block; + width: 190px; + padding-right: 10px; + text-align: right; + } +small + { + color: #777; + } +input[type=text] + { + width: 100px; + } +#img-url,#output-url,#img-background + { + width: 200px; + } +#bgswitcheroo, #colorswitcheroo + { + width: 19px; + height:38px; + display: inline-block; + position: absolute; + background-image: url(http://i.asdf.us/im/7e/user_convo_1353562627_1355449919.png); + //background-image: url( http://i.asdf.us/im/7b/user_convo_1353562627.png); + background-repeat:no-repeat; + background-position: 3px 10px; + cursor: pointer; + } +#img-fuzz,#img-width,#img-height,#img-brightness,#img-saturation,#img-contrast,#img-hue,#img-rotate + { + width: 50px; + text-align: right; + } +button + { + padding: 2px 5px; + font-size: 16px; + } +#result img + { + max-width: 400px; + max-height: 400px; + } +#output-cmd + { + font-size: 12px; + white-space: pre; + } +.shim + { + height: 10px; + clear: both; + display: block; + } +#output-url + { + width: 320px; + } +#likebutton + { + display: none; + position: absolute; + bottom: 10px; + right: 10px; + width: 350px; + background-color: #fff; +// background-image: url(imcupbg.jpg); + padding: 10px; + color: #ddd; + font-family: trebuchet ms, sans-serif; + } +div#controls, span#userlink { + display: none; +} span#userlink a { + text-transform: capitalize; +} diff --git a/share/frontend/im/gallery_style.css b/share/frontend/im/gallery_style.css deleted file mode 100755 index 2d78a0e..0000000 --- a/share/frontend/im/gallery_style.css +++ /dev/null @@ -1,51 +0,0 @@ -/**** Isotope Filtering ****/ - -.isotope-item { - z-index: 2; -} - -.isotope-hidden.isotope-item { - pointer-events: none; - z-index: 1; -} - -/**** Isotope CSS3 transitions ****/ - -.isotope, -.isotope .isotope-item { - -webkit-transition-duration: 0.3s; - -moz-transition-duration: 0.3s; - -ms-transition-duration: 0.3s; - -o-transition-duration: 0.3s; - transition-duration: 0.3s; -} - - -.isotope { - -webkit-transition-property: height, width; - -moz-transition-property: height, width; - -ms-transition-property: height, width; - -o-transition-property: height, width; - transition-property: height, width; -} - -.isotope .isotope-item { - -webkit-transition-property: -webkit-transform, opacity; - -moz-transition-property: -moz-transform, opacity; - -ms-transition-property: -ms-transform, opacity; - -o-transition-property: -o-transform, opacity; - transition-property: transform, opacity; -} - -/**** disabling Isotope CSS3 transitions ****/ - -.isotope.no-transition, -.isotope.no-transition .isotope-item, -.isotope .isotope-item.no-transition { - -webkit-transition-duration: 0s; - -moz-transition-duration: 0s; - -ms-transition-duration: 0s; - -o-transition-duration: 0s; - transition-duration: 0s; -} - diff --git a/share/frontend/im/imcupbg.jpg b/share/frontend/im/imcupbg.jpg deleted file mode 100755 index b3cf3f5..0000000 Binary files a/share/frontend/im/imcupbg.jpg and /dev/null differ diff --git a/share/frontend/im/img/arrow_pointing_left.png b/share/frontend/im/img/arrow_pointing_left.png new file mode 100755 index 0000000..ba1fb53 Binary files /dev/null and b/share/frontend/im/img/arrow_pointing_left.png differ diff --git a/share/frontend/im/img/imcupbg.jpg b/share/frontend/im/img/imcupbg.jpg new file mode 100755 index 0000000..b3cf3f5 Binary files /dev/null and b/share/frontend/im/img/imcupbg.jpg differ diff --git a/share/frontend/im/img/new.gif b/share/frontend/im/img/new.gif new file mode 100755 index 0000000..37c39d2 Binary files /dev/null and b/share/frontend/im/img/new.gif differ diff --git a/share/frontend/im/index.html b/share/frontend/im/index.html index c19770f..313fe04 100755 --- a/share/frontend/im/index.html +++ b/share/frontend/im/index.html @@ -1,4 +1,4 @@ - + PHOTOBLASTER @@ -13,179 +13,7 @@ - + @@ -372,7 +200,7 @@ div#controls, span#userlink {

- + Draw color codes → Ascii Mess around with heightmaps and textures → ImLandscape @@ -383,7 +211,6 @@ div#controls, span#userlink { Oh now it's on....payback time → FOTO FUCKER - Transform images in 3D → Grid Generator Gradients make everything better → Gradient Generator @@ -417,149 +244,10 @@ div#controls, span#userlink { --> - + - + diff --git a/share/frontend/im/jquery-ui-1.8.16.custom.min.js b/share/frontend/im/jquery-ui-1.8.16.custom.min.js deleted file mode 100755 index 3042d0b..0000000 --- a/share/frontend/im/jquery-ui-1.8.16.custom.min.js +++ /dev/null @@ -1,84 +0,0 @@ -/*! - * jQuery UI 1.8.16 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI - */ -(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.16", -keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d= -this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this, -"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart": -"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight, -outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a, -"tabindex"),d=isNaN(b);return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&& -a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted= -false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); -;/* - * jQuery UI Slider 1.8.16 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Slider - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var a=this,b=this.options,c=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f=b.values&&b.values.length||1,e=[];this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+ -this.orientation+" ui-widget ui-widget-content ui-corner-all"+(b.disabled?" ui-slider-disabled ui-disabled":""));this.range=d([]);if(b.range){if(b.range===true){if(!b.values)b.values=[this._valueMin(),this._valueMin()];if(b.values.length&&b.values.length!==2)b.values=[b.values[0],b.values[0]]}this.range=d("

").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(b.range==="min"||b.range==="max"?" ui-slider-range-"+b.range:""))}for(var j=c.length;j"); -this.handles=c.add(d(e.join("")).appendTo(a.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(g){g.preventDefault()}).hover(function(){b.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(b.disabled)d(this).blur();else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(g){d(this).data("index.ui-slider-handle", -g)});this.handles.keydown(function(g){var k=true,l=d(this).data("index.ui-slider-handle"),i,h,m;if(!a.options.disabled){switch(g.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:k=false;if(!a._keySliding){a._keySliding=true;d(this).addClass("ui-state-active");i=a._start(g,l);if(i===false)return}break}m=a.options.step;i=a.options.values&&a.options.values.length? -(h=a.values(l)):(h=a.value());switch(g.keyCode){case d.ui.keyCode.HOME:h=a._valueMin();break;case d.ui.keyCode.END:h=a._valueMax();break;case d.ui.keyCode.PAGE_UP:h=a._trimAlignValue(i+(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:h=a._trimAlignValue(i-(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(i===a._valueMax())return;h=a._trimAlignValue(i+m);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(i===a._valueMin())return;h=a._trimAlignValue(i- -m);break}a._slide(g,l,h);return k}}).keyup(function(g){var k=d(this).data("index.ui-slider-handle");if(a._keySliding){a._keySliding=false;a._stop(g,k);a._change(g,k);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy(); -return this},_mouseCapture:function(a){var b=this.options,c,f,e,j,g;if(b.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:a.pageX,y:a.pageY});f=this._valueMax()-this._valueMin()+1;j=this;this.handles.each(function(k){var l=Math.abs(c-j.values(k));if(f>l){f=l;e=d(this);g=k}});if(b.range===true&&this.values(1)===b.min){g+=1;e=d(this.handles[g])}if(this._start(a,g)===false)return false; -this._mouseSliding=true;j._handleIndex=g;e.addClass("ui-state-active").focus();b=e.offset();this._clickOffset=!d(a.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:a.pageX-b.left-e.width()/2,top:a.pageY-b.top-e.height()/2-(parseInt(e.css("borderTopWidth"),10)||0)-(parseInt(e.css("borderBottomWidth"),10)||0)+(parseInt(e.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(a,g,c);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(a){var b= -this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,b);return false},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b;if(this.orientation==="horizontal"){b= -this.elementSize.width;a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{b=this.elementSize.height;a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}b=a/b;if(b>1)b=1;if(b<0)b=0;if(this.orientation==="vertical")b=1-b;a=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+b*a)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b); -c.values=this.values()}return this._trigger("start",a,c)},_slide:function(a,b,c){var f;if(this.options.values&&this.options.values.length){f=this.values(b?0:1);if(this.options.values.length===2&&this.options.range===true&&(b===0&&c>f||b===1&&c1){this.options.values[a]=this._trimAlignValue(b);this._refreshValue();this._change(null,a)}else if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;f=arguments[0];for(e=0;e=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b;a=a-c;if(Math.abs(c)*2>=b)a+=c>0?b:-b;return parseFloat(a.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var a= -this.options.range,b=this.options,c=this,f=!this._animateOff?b.animate:false,e,j={},g,k,l,i;if(this.options.values&&this.options.values.length)this.handles.each(function(h){e=(c.values(h)-c._valueMin())/(c._valueMax()-c._valueMin())*100;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";d(this).stop(1,1)[f?"animate":"css"](j,b.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(h===0)c.range.stop(1,1)[f?"animate":"css"]({left:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({width:e- -g+"%"},{queue:false,duration:b.animate})}else{if(h===0)c.range.stop(1,1)[f?"animate":"css"]({bottom:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({height:e-g+"%"},{queue:false,duration:b.animate})}g=e});else{k=this.value();l=this._valueMin();i=this._valueMax();e=i!==l?(k-l)/(i-l)*100:0;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[f?"animate":"css"](j,b.animate);if(a==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[f?"animate":"css"]({width:e+"%"}, -b.animate);if(a==="max"&&this.orientation==="horizontal")this.range[f?"animate":"css"]({width:100-e+"%"},{queue:false,duration:b.animate});if(a==="min"&&this.orientation==="vertical")this.range.stop(1,1)[f?"animate":"css"]({height:e+"%"},b.animate);if(a==="max"&&this.orientation==="vertical")this.range[f?"animate":"css"]({height:100-e+"%"},{queue:false,duration:b.animate})}}});d.extend(d.ui.slider,{version:"1.8.16"})})(jQuery); -; \ No newline at end of file diff --git a/share/frontend/im/js/jquery-ui-1.8.16.custom.min.js b/share/frontend/im/js/jquery-ui-1.8.16.custom.min.js new file mode 100755 index 0000000..3042d0b --- /dev/null +++ b/share/frontend/im/js/jquery-ui-1.8.16.custom.min.js @@ -0,0 +1,84 @@ +/*! + * jQuery UI 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.16", +keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d= +this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this, +"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart": +"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight, +outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a, +"tabindex"),d=isNaN(b);return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&& +a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted= +false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); +;/* + * jQuery UI Slider 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Slider + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var a=this,b=this.options,c=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f=b.values&&b.values.length||1,e=[];this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+ +this.orientation+" ui-widget ui-widget-content ui-corner-all"+(b.disabled?" ui-slider-disabled ui-disabled":""));this.range=d([]);if(b.range){if(b.range===true){if(!b.values)b.values=[this._valueMin(),this._valueMin()];if(b.values.length&&b.values.length!==2)b.values=[b.values[0],b.values[0]]}this.range=d("
").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(b.range==="min"||b.range==="max"?" ui-slider-range-"+b.range:""))}for(var j=c.length;j"); +this.handles=c.add(d(e.join("")).appendTo(a.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(g){g.preventDefault()}).hover(function(){b.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(b.disabled)d(this).blur();else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(g){d(this).data("index.ui-slider-handle", +g)});this.handles.keydown(function(g){var k=true,l=d(this).data("index.ui-slider-handle"),i,h,m;if(!a.options.disabled){switch(g.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:k=false;if(!a._keySliding){a._keySliding=true;d(this).addClass("ui-state-active");i=a._start(g,l);if(i===false)return}break}m=a.options.step;i=a.options.values&&a.options.values.length? +(h=a.values(l)):(h=a.value());switch(g.keyCode){case d.ui.keyCode.HOME:h=a._valueMin();break;case d.ui.keyCode.END:h=a._valueMax();break;case d.ui.keyCode.PAGE_UP:h=a._trimAlignValue(i+(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:h=a._trimAlignValue(i-(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(i===a._valueMax())return;h=a._trimAlignValue(i+m);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(i===a._valueMin())return;h=a._trimAlignValue(i- +m);break}a._slide(g,l,h);return k}}).keyup(function(g){var k=d(this).data("index.ui-slider-handle");if(a._keySliding){a._keySliding=false;a._stop(g,k);a._change(g,k);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy(); +return this},_mouseCapture:function(a){var b=this.options,c,f,e,j,g;if(b.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:a.pageX,y:a.pageY});f=this._valueMax()-this._valueMin()+1;j=this;this.handles.each(function(k){var l=Math.abs(c-j.values(k));if(f>l){f=l;e=d(this);g=k}});if(b.range===true&&this.values(1)===b.min){g+=1;e=d(this.handles[g])}if(this._start(a,g)===false)return false; +this._mouseSliding=true;j._handleIndex=g;e.addClass("ui-state-active").focus();b=e.offset();this._clickOffset=!d(a.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:a.pageX-b.left-e.width()/2,top:a.pageY-b.top-e.height()/2-(parseInt(e.css("borderTopWidth"),10)||0)-(parseInt(e.css("borderBottomWidth"),10)||0)+(parseInt(e.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(a,g,c);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(a){var b= +this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,b);return false},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b;if(this.orientation==="horizontal"){b= +this.elementSize.width;a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{b=this.elementSize.height;a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}b=a/b;if(b>1)b=1;if(b<0)b=0;if(this.orientation==="vertical")b=1-b;a=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+b*a)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b); +c.values=this.values()}return this._trigger("start",a,c)},_slide:function(a,b,c){var f;if(this.options.values&&this.options.values.length){f=this.values(b?0:1);if(this.options.values.length===2&&this.options.range===true&&(b===0&&c>f||b===1&&c1){this.options.values[a]=this._trimAlignValue(b);this._refreshValue();this._change(null,a)}else if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;f=arguments[0];for(e=0;e=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b;a=a-c;if(Math.abs(c)*2>=b)a+=c>0?b:-b;return parseFloat(a.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var a= +this.options.range,b=this.options,c=this,f=!this._animateOff?b.animate:false,e,j={},g,k,l,i;if(this.options.values&&this.options.values.length)this.handles.each(function(h){e=(c.values(h)-c._valueMin())/(c._valueMax()-c._valueMin())*100;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";d(this).stop(1,1)[f?"animate":"css"](j,b.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(h===0)c.range.stop(1,1)[f?"animate":"css"]({left:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({width:e- +g+"%"},{queue:false,duration:b.animate})}else{if(h===0)c.range.stop(1,1)[f?"animate":"css"]({bottom:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({height:e-g+"%"},{queue:false,duration:b.animate})}g=e});else{k=this.value();l=this._valueMin();i=this._valueMax();e=i!==l?(k-l)/(i-l)*100:0;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[f?"animate":"css"](j,b.animate);if(a==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[f?"animate":"css"]({width:e+"%"}, +b.animate);if(a==="max"&&this.orientation==="horizontal")this.range[f?"animate":"css"]({width:100-e+"%"},{queue:false,duration:b.animate});if(a==="min"&&this.orientation==="vertical")this.range.stop(1,1)[f?"animate":"css"]({height:e+"%"},b.animate);if(a==="max"&&this.orientation==="vertical")this.range[f?"animate":"css"]({height:100-e+"%"},{queue:false,duration:b.animate})}}});d.extend(d.ui.slider,{version:"1.8.16"})})(jQuery); +; \ No newline at end of file diff --git a/share/frontend/im/js/main.js b/share/frontend/im/js/main.js new file mode 100644 index 0000000..8f8b01a --- /dev/null +++ b/share/frontend/im/js/main.js @@ -0,0 +1,138 @@ +var Main = + { + API_HEADER: "#@im", + generating: false, + enter: function (e) + { + if (Main.generating) + return + if (e.keyCode === 13) + Main.go() + }, + go: function () + { + if (Main.generating) + return + Main.generating = true + $("#output-cmd").html('generating...').show() + $("#result").show() + var data = + { + url: $("#img-url").val(), + transparent: $('#img-transparent:checked').val() !== undefined ? "true" : "false", + flip: $('#img-flip:checked').val() !== undefined ? "true" : "false", + flop: $('#img-flop:checked').val() !== undefined ? "true" : "false", + nearest: $('#img-nearest:checked').val() !== undefined ? "true" : "false", + rotate: $("#img-rotate").val(), + subtract: $("#img-subtract").val(), + fuzz: $("#img-fuzz").val(), + width: $("#img-width").val(), + height: $("#img-height").val(), + black: $("#img-black").val(), + white: $("#img-white").val(), + //brightness: $("#img-brightness").val(), + //saturation: $("#img-saturation").val(), + hue: $("#img-hue").val(), + contrast: $("#img-contrast").val(), + background: $("#img-background").val(), + // merge_early: $('#img-merge_early:checked').val() !== undefined ? "true" : "false", + compose: $('#img-compose :selected').text(), + gravity: $('#img-gravity :selected').text(), + // tile: $('#img-tile:checked').val() !== undefined ? "true" : "false", + format: $('#img-format :selected').text(), + dispose: $('#dispose').val(), + username: $("#img-name").val(), + } + if (data.rotate.match(/-/)){ data.rotate=360-parseInt(data.rotate.replace("-","")); }; + $("#img-rotate").val(""); + if (data.username.length > 0) + document.cookie = "imname="+data.username+";path=/;domain=.asdf.us;max-age=1086400" + $.post("/im/api/generate", data, Main.callback) + }, + error: function (s) + { + $("#output-cmd").html("ERROR: " + s + "").show() + $("#output-url").hide() + $("#output-img").hide() + }, + callback: function (data) + { + Main.generating = false + $("#output-cmd").html("size: "+Main.filesize(data.size)+"
" + + data.width + " x " + data.height); + + $("#output-url").val(data.url); + $("#output-img").hide().attr("src", data.url).fadeIn(700) + $("#sendtoinput").html(" send to input  ").css({"border": "1px solid gray", "cursor" : "pointer"}).click(function(){ + $("#img-url").val(data.url); + }); + + }, + filesize: function (size) + { + if (size < 1024) + return size + " bytes" + if (size < 1024 * 1024) + return Math.floor (size/1024) + " KB" + else + return Math.floor (size/(1024*1024)) + " MB" + }, + cookie: function () + { + if (document.cookie) + { + var cookies = document.cookie.split(";") + for (i in cookies) + { + var cookie = cookies[i].split("=") + if (cookie[0].indexOf("imname") !== -1) + { + if (cookie[1] !== 'false' && cookie[1] !== 'undefined' && cookie[1].length) + { + return cookie[1] + } + } + } + } + return "" + }, + preloadSize: function(url,label,tag){ + console.log(url) + var img = new Image() + img.onload = function(){ $(label).html( tag + ": " + img.naturalWidth + " x " + img.naturalHeight ) } + img.src = url + }, + init: function () + { + var name = Main.cookie () + $("#img-name").val(name) + if (name) + { + $("#userlink").show() + $("#userlink a").attr("href", "/im/gallery/?name="+name).html(name+"'s photoblasts") + } + $("#likebutton,#controls").fadeIn(0) + $("#img-generate").bind("click", Main.go) + $("div input[type=text]").bind("keydown", Main.enter) + $("#img-url").change(function(){Main.preloadSize(this.value,"#img-url-label","image")}) + $("#img-background").change(function(){Main.preloadSize(this.value,"#background-url-label","bg")}) + $("#bgswitcheroo").click(function() { + a = $("#img-url").val(); + b = $("#img-background").val(); + $("#img-url").val(b); + $("#img-background").val(a); + }); + $("#colorswitcheroo").click(function() { + a = $("#img-white").val(); + b = $("#img-black").val(); + $("#img-white").val(b); + $("#img-black").val(a); + }); + $("#img-format").change(function(){ + $("#gif-options").css( "visibility", $("#img-format").val() === "gif" ? "visible" : "hidden") + }) + + }, + } +document.getElementById('imform').reset(); +Main.init () diff --git a/share/frontend/im/new.gif b/share/frontend/im/new.gif deleted file mode 100755 index 37c39d2..0000000 Binary files a/share/frontend/im/new.gif and /dev/null differ -- cgit v1.2.3-70-g09d2