From 543fa1107a16966758d67f95dd080dad24a73e97 Mon Sep 17 00:00:00 2001 From: Pepper Date: Mon, 17 Apr 2023 05:44:26 +0000 Subject: python 3 --- share/frontend/css/cssreset.css | 1 - share/frontend/css/general.css | 1 - share/frontend/css/jquery-ui-1.8.16.custom.css | 1 - share/frontend/css/main.css | 1 - share/frontend/css/normalize.css | 1 - share/frontend/css/overlay.css | 1 - share/frontend/css/result.css | 1 - share/frontend/css/sketch.css | 1 - share/frontend/css/unsemantic-grid-responsive.css | 1 - share/frontend/gallery-static/js/main.js | 38 ++++++++++++++++------- share/frontend/gallery-static/main.css | 15 ++++++++- share/frontend/js/colors_iframe.js | 1 - share/frontend/js/display_result.js | 1 - share/frontend/js/inputs.js | 1 - share/frontend/js/jquery-1.6.4.min.js | 1 - share/frontend/js/jquery-ui.min.js | 1 - share/frontend/js/main.js | 1 - share/frontend/js/overlay.js | 1 - share/frontend/js/preview.js | 1 - share/frontend/js/sketch.js | 1 - share/frontend/js/sliders.js | 1 - share/frontend/js/urls.js | 1 - share/frontend/js/username.js | 1 - 23 files changed, 40 insertions(+), 34 deletions(-) delete mode 120000 share/frontend/css/cssreset.css delete mode 120000 share/frontend/css/general.css delete mode 120000 share/frontend/css/jquery-ui-1.8.16.custom.css delete mode 120000 share/frontend/css/main.css delete mode 120000 share/frontend/css/normalize.css delete mode 120000 share/frontend/css/overlay.css delete mode 120000 share/frontend/css/result.css delete mode 120000 share/frontend/css/sketch.css delete mode 120000 share/frontend/css/unsemantic-grid-responsive.css delete mode 120000 share/frontend/js/colors_iframe.js delete mode 120000 share/frontend/js/display_result.js delete mode 120000 share/frontend/js/inputs.js delete mode 120000 share/frontend/js/jquery-1.6.4.min.js delete mode 120000 share/frontend/js/jquery-ui.min.js delete mode 120000 share/frontend/js/main.js delete mode 120000 share/frontend/js/overlay.js delete mode 120000 share/frontend/js/preview.js delete mode 120000 share/frontend/js/sketch.js delete mode 120000 share/frontend/js/sliders.js delete mode 120000 share/frontend/js/urls.js delete mode 120000 share/frontend/js/username.js (limited to 'share/frontend') diff --git a/share/frontend/css/cssreset.css b/share/frontend/css/cssreset.css deleted file mode 120000 index 6924554..0000000 --- a/share/frontend/css/cssreset.css +++ /dev/null @@ -1 +0,0 @@ -../imgrid/css/cssreset.css \ No newline at end of file diff --git a/share/frontend/css/general.css b/share/frontend/css/general.css deleted file mode 120000 index ae33e3a..0000000 --- a/share/frontend/css/general.css +++ /dev/null @@ -1 +0,0 @@ -../imgrid/css/general.css \ No newline at end of file diff --git a/share/frontend/css/jquery-ui-1.8.16.custom.css b/share/frontend/css/jquery-ui-1.8.16.custom.css deleted file mode 120000 index 36a911f..0000000 --- a/share/frontend/css/jquery-ui-1.8.16.custom.css +++ /dev/null @@ -1 +0,0 @@ -../imgrid/css/jquery-ui-1.8.16.custom.css \ No newline at end of file diff --git a/share/frontend/css/main.css b/share/frontend/css/main.css deleted file mode 120000 index 4f96fb7..0000000 --- a/share/frontend/css/main.css +++ /dev/null @@ -1 +0,0 @@ -../impattern/css/main.css \ No newline at end of file diff --git a/share/frontend/css/normalize.css b/share/frontend/css/normalize.css deleted file mode 120000 index 2fbfef8..0000000 --- a/share/frontend/css/normalize.css +++ /dev/null @@ -1 +0,0 @@ -../impattern/css/normalize.css \ No newline at end of file diff --git a/share/frontend/css/overlay.css b/share/frontend/css/overlay.css deleted file mode 120000 index 264d326..0000000 --- a/share/frontend/css/overlay.css +++ /dev/null @@ -1 +0,0 @@ -../impattern/css/overlay.css \ No newline at end of file diff --git a/share/frontend/css/result.css b/share/frontend/css/result.css deleted file mode 120000 index e90c968..0000000 --- a/share/frontend/css/result.css +++ /dev/null @@ -1 +0,0 @@ -../impattern/css/result.css \ No newline at end of file diff --git a/share/frontend/css/sketch.css b/share/frontend/css/sketch.css deleted file mode 120000 index d2d99ca..0000000 --- a/share/frontend/css/sketch.css +++ /dev/null @@ -1 +0,0 @@ -../impattern/css/sketch.css \ No newline at end of file diff --git a/share/frontend/css/unsemantic-grid-responsive.css b/share/frontend/css/unsemantic-grid-responsive.css deleted file mode 120000 index b5fd8ec..0000000 --- a/share/frontend/css/unsemantic-grid-responsive.css +++ /dev/null @@ -1 +0,0 @@ -../impattern/css/unsemantic-grid-responsive.css \ No newline at end of file diff --git a/share/frontend/gallery-static/js/main.js b/share/frontend/gallery-static/js/main.js index aadc7e1..b72ee6c 100644 --- a/share/frontend/gallery-static/js/main.js +++ b/share/frontend/gallery-static/js/main.js @@ -82,22 +82,35 @@ var Dump = { } } -function applyTag(tagname){ - tag_regex = /&tag=[^&]*/; - if (document.URL.match(tag_regex)){ - return document.URL.replace(tag_regex, "&tag="+tagname); - }else if(document.URL.match(/\/$/)){ - return document.URL.replace(/\/$/, "?tag="+tagname); - } - else{ - return document.URL+"&tag="+tagname; - } +function applyTag(tagname) { + var qs = $.QueryString + qs.tag = tagname + return serializeQS(qs) +} +function serializeQS (obj) { + let str = []; + for (let p in obj) + if (obj.hasOwnProperty(p)) { + str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); + } + return str.join("&"); } var Main = { editing: false, kp: function (event) { + if (document.activeElement && document.activeElement.getAttribute('id') === 'search-q') + { + if (event.keyCode === 13) + { + var qs = $.QueryString + qs.text = document.activeElement.value + delete qs.start + window.location.search = serializeQS(qs) + } + return + } switch (event.keyCode) { // BS @@ -163,9 +176,10 @@ var Main = $("#help").click(function(){ $("#keys").slideToggle() }) $("#actions b").click(function(){ $("#sorting-optionsContainer").slideToggle() }) $("#tags b").click(function(){ $("#tag-optionsContainer").slideToggle() }) - $(".tag-options").click(function(){document.location.href= applyTag(this.id)}); - $(".tag-clear").click(function(){ document.location.href = document.URL.replace(/&?tag=[^&]*/ ,"").replace(/\?$/,"")}); + $(".tag-options").click(function(){document.location.search = applyTag(this.id)}); + $(".tag-clear").click(function(){ document.location.search = '' }); $("div img").live("click", Dump.pick) + $("#search-q").val($.QueryString.text || "") Dump.load_rebus() // Dump.clear() } diff --git a/share/frontend/gallery-static/main.css b/share/frontend/gallery-static/main.css index 1201689..56afc1d 100644 --- a/share/frontend/gallery-static/main.css +++ b/share/frontend/gallery-static/main.css @@ -18,6 +18,19 @@ div img { cursor: pointer; // display: none; } +#search { + position: fixed; + left: 300px; + top: 10px; +} +#search input { + padding: 3px; + border: 1px solid #ddd; + font-weight: bold; + background: #f8f4fb; + font-size: 16px; + width: 140px; +} #dump { position: fixed; left: 0; @@ -66,7 +79,7 @@ div img { { position: fixed; top: 10px; - left: 200px; + left: 150px; cursor: pointer; text-align: left; font-family: sans-serif; diff --git a/share/frontend/js/colors_iframe.js b/share/frontend/js/colors_iframe.js deleted file mode 120000 index 7b48e9f..0000000 --- a/share/frontend/js/colors_iframe.js +++ /dev/null @@ -1 +0,0 @@ -../imgrid/js/colors_iframe.js \ No newline at end of file diff --git a/share/frontend/js/display_result.js b/share/frontend/js/display_result.js deleted file mode 120000 index 3108446..0000000 --- a/share/frontend/js/display_result.js +++ /dev/null @@ -1 +0,0 @@ -../impattern/js/display_result.js \ No newline at end of file diff --git a/share/frontend/js/inputs.js b/share/frontend/js/inputs.js deleted file mode 120000 index 7dd0da5..0000000 --- a/share/frontend/js/inputs.js +++ /dev/null @@ -1 +0,0 @@ -../impattern/js/inputs.js \ No newline at end of file diff --git a/share/frontend/js/jquery-1.6.4.min.js b/share/frontend/js/jquery-1.6.4.min.js deleted file mode 120000 index 168445e..0000000 --- a/share/frontend/js/jquery-1.6.4.min.js +++ /dev/null @@ -1 +0,0 @@ -../imgrid/js/jquery-1.6.4.min.js \ No newline at end of file diff --git a/share/frontend/js/jquery-ui.min.js b/share/frontend/js/jquery-ui.min.js deleted file mode 120000 index 4d744ec..0000000 --- a/share/frontend/js/jquery-ui.min.js +++ /dev/null @@ -1 +0,0 @@ -../imbreak/js/jquery-ui.min.js \ No newline at end of file diff --git a/share/frontend/js/main.js b/share/frontend/js/main.js deleted file mode 120000 index 1c1c131..0000000 --- a/share/frontend/js/main.js +++ /dev/null @@ -1 +0,0 @@ -../imgrid/js/main.js \ No newline at end of file diff --git a/share/frontend/js/overlay.js b/share/frontend/js/overlay.js deleted file mode 120000 index dd2be26..0000000 --- a/share/frontend/js/overlay.js +++ /dev/null @@ -1 +0,0 @@ -../impattern/js/overlay.js \ No newline at end of file diff --git a/share/frontend/js/preview.js b/share/frontend/js/preview.js deleted file mode 120000 index 16cbafb..0000000 --- a/share/frontend/js/preview.js +++ /dev/null @@ -1 +0,0 @@ -../impattern/js/preview.js \ No newline at end of file diff --git a/share/frontend/js/sketch.js b/share/frontend/js/sketch.js deleted file mode 120000 index 9e4ec4c..0000000 --- a/share/frontend/js/sketch.js +++ /dev/null @@ -1 +0,0 @@ -../impattern/js/sketch.js \ No newline at end of file diff --git a/share/frontend/js/sliders.js b/share/frontend/js/sliders.js deleted file mode 120000 index 6ebbd4f..0000000 --- a/share/frontend/js/sliders.js +++ /dev/null @@ -1 +0,0 @@ -../imgrid/js/sliders.js \ No newline at end of file diff --git a/share/frontend/js/urls.js b/share/frontend/js/urls.js deleted file mode 120000 index 018f8c5..0000000 --- a/share/frontend/js/urls.js +++ /dev/null @@ -1 +0,0 @@ -../impattern/js/urls.js \ No newline at end of file diff --git a/share/frontend/js/username.js b/share/frontend/js/username.js deleted file mode 120000 index d7b2691..0000000 --- a/share/frontend/js/username.js +++ /dev/null @@ -1 +0,0 @@ -../impattern/js/username.js \ No newline at end of file -- cgit v1.2.3-70-g09d2