From fd359fb08c6e38da1b63cbb73ddd7ba2c3279d09 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 28 Mar 2020 00:56:54 +0000 Subject: [PATCH] remove broken tagger extension --- ext/tagger/images/active.png | Bin 183 -> 0 bytes ext/tagger/images/add-tag.png | Bin 227 -> 0 bytes ext/tagger/images/inactive.png | Bin 170 -> 0 bytes ext/tagger/images/rem-tag.png | Bin 198 -> 0 bytes ext/tagger/images/tag-img.psd | Bin 2148 -> 0 bytes ext/tagger/info.php | 12 -- ext/tagger/main.php | 28 ----- ext/tagger/script.js | 221 --------------------------------- ext/tagger/style.css | 103 --------------- ext/tagger/theme.php | 75 ----------- ext/tagger/webtoolkit.drag.js | 87 ------------- 11 files changed, 526 deletions(-) delete mode 100644 ext/tagger/images/active.png delete mode 100644 ext/tagger/images/add-tag.png delete mode 100644 ext/tagger/images/inactive.png delete mode 100644 ext/tagger/images/rem-tag.png delete mode 100644 ext/tagger/images/tag-img.psd delete mode 100644 ext/tagger/info.php delete mode 100644 ext/tagger/main.php delete mode 100644 ext/tagger/script.js delete mode 100644 ext/tagger/style.css delete mode 100644 ext/tagger/theme.php delete mode 100644 ext/tagger/webtoolkit.drag.js diff --git a/ext/tagger/images/active.png b/ext/tagger/images/active.png deleted file mode 100644 index 4e4942c8c5a6e8feea2cff6c10ba8eb424db9f3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 183 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4u_bxCyDDqA0IPmT(MivH9 X4OWH=yO!z$l`(j_`njxgN@xNAvJx>W diff --git a/ext/tagger/images/add-tag.png b/ext/tagger/images/add-tag.png deleted file mode 100644 index dccedf8ddddb993f70433fe86b774538df5bce75..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 227 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4u_bxCyDKq1)@*N775{M_8syb=cIqSVBa z)D(sC%#sX+kc?CXcTeAd_bIA*K!xs}E{-7*m#0oR$jhL>!OZ`-hwtR1uS*RzIKR0s zU}x>x6rlZj`->7wz5N}wibr|3U8o9VXyawb-k(@f4u_bxCyDFVdQ I&MBb@0P46Y%m4rY diff --git a/ext/tagger/images/rem-tag.png b/ext/tagger/images/rem-tag.png deleted file mode 100644 index 5fb9827a0f400c615120a8c0c27d6f4c9cfc7f66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4u_bxCyD_A-%p00i_>zopr0N6t|Qvd(} diff --git a/ext/tagger/images/tag-img.psd b/ext/tagger/images/tag-img.psd deleted file mode 100644 index 4404dfeea31c728a139b28eba5fff6b859d508a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2148 zcmd^=%}T>S5XUD?sUP&vg9o1>&`VF^Npey_5WMyhZIvReP+IYs_9c8GkY{%2;B zO_SCyL=bn$>}F>6x3jym$w7R6K>=wA(d^2zP2A@a9mFSR;gj?`bc{AYbuHVPVxk69 zS{a@fYN<-3@|xD-EfP&6^Fr=Sh{Aro-_& zq(dQX*efCVy-KcTqx)e6wq~#1qwULl5be=ql^0+gwVG1BV%0T2YSjHw&Y|D(v}vtk z_BQ6PJlomARa&Hr@4o$Eb_4fzwc_kDTH4G>qG!3LRay2a&bCa#S#uUF$(p5;mR^k| zm1RBqx$Ia^utI>uSbS7e;;qnsNcc(&yeB)TEzMWWW!;B>?CT@uN3^b^dgtRaoY zU2W+~?77aZnmyN#DE8|IM&x@daVbytuzZ%PQEMqWw-#Pg9!a_V_nw?FyOK35_3S^T zOKpZM&LBfF1|7oHvj+cE8}LoR$Juwht#H@T_}-ZeIi5j=xEJUU7#1utfx)c-$9KG~ caM#hPDRVd;<#0SQoa6Bw;fRen;+}Kf0P5AOVE_OC diff --git a/ext/tagger/info.php b/ext/tagger/info.php deleted file mode 100644 index 3eedce9d..00000000 --- a/ext/tagger/info.php +++ /dev/null @@ -1,12 +0,0 @@ -"artanis.00@gmail.com"]; - public $dependencies = [TaggerXMLInfo::KEY]; - public $description = "Advanced Tagging v2"; -} diff --git a/ext/tagger/main.php b/ext/tagger/main.php deleted file mode 100644 index 645d3a19..00000000 --- a/ext/tagger/main.php +++ /dev/null @@ -1,28 +0,0 @@ -can(Permissions::EDIT_IMAGE_TAG) && ($event->image->is_locked() || $user->can(Permissions::EDIT_IMAGE_LOCK))) { - $this->theme->build_tagger($page, $event); - } - } - - public function onSetupBuilding(SetupBuildingEvent $event) - { - $sb = new SetupBlock("Tagger"); - $sb->add_int_option("ext_tagger_search_delay", "Delay queries by "); - $sb->add_label(" milliseconds."); - $sb->add_label("
Limit queries returning more than "); - $sb->add_int_option("ext_tagger_tag_max"); - $sb->add_label(" tags to "); - $sb->add_int_option("ext_tagger_limit"); - $event->panel->add_block($sb); - } -} diff --git a/ext/tagger/script.js b/ext/tagger/script.js deleted file mode 100644 index 1a72e04e..00000000 --- a/ext/tagger/script.js +++ /dev/null @@ -1,221 +0,0 @@ -/*jshint forin:false, nonew:true, undef:true, strict:false, browser:true, jquery:true */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ -* Tagger - Advanced Tagging v2 * -* Author: Artanis (Erik Youngren ) * -* Do not remove this notice. * -\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -function byId(id) { - return document.getElementById(id); -} - -var Tagger = { - initialize : function (image_id) { - // object navigation - this.tag.parent = this; - this.position.parent = this; - // components - this.editor.container = byId('tagger_parent'); - this.editor.titlebar = byId('tagger_titlebar'); - this.editor.toolbar = byId('tagger_toolbar'); - //this.editor.menu = byId('tagger_p-menu'); - this.editor.body = byId('tagger_body'); - this.editor.tags = byId('tagger_tags'); - this.editor.form = this.editor.tags.parentNode; - this.editor.statusbar = byId('tagger_statusbar'); - // initial data - this.tag.image = image_id; - this.tag.query = config.make_link("tagger/tags"); - this.tag.list = null; - this.tag.suggest = null; - this.tag.image_tags(); - - // reveal - this.editor.container.style.display = ""; - - // dragging - DragHandler.attach(this.editor.titlebar); - - // positioning - this.position.load(); - - // events - window.onunload = function () { Tagger.position.save(); }; - }, - - alert : function (type,text,timeout) { - var id = "tagger_alert-"+type; - var t_alert = byId(id); - if (t_alert) { - if(text === false) { - // remove - t_alert.parentNode.removeChild(t_alert); - } else { - // update - t_alert.innerHTML = text; - } - } else if (text) { - // create - t_alert = document.createElement("div"); - t_alert.setAttribute("id",id); - t_alert.appendChild(document.createTextNode(text)); - this.editor.statusbar.appendChild(t_alert); - if(timeout>1) { - console.log("Tagger.alert('"+type+"',false,0)"); - setTimeout("Tagger.alert('"+type+"',false,0)",timeout); - } - } - }, - - editor : {}, - - tag : { - submit : function () { - var l = this.list.childNodes.length; - var tags = []; - for(var i=0; i 0) { - var tag = document.createElement("tag"); - tag.setAttribute("count","0"); - tag.setAttribute("id","newTag_"+tag_name); - tag.setAttribute("title","New - 0 uses"); - tag.onclick = function() { - Tagger.tag.toggle(this); - }; - tag.appendChild(document.createTextNode(tag_name)); - Tagger.tag.list.appendChild(tag); - } - }, - - toggle : function (tag) { - if(tag.parentNode == this.list) { - this.list.removeChild(tag); - } else { - this.list.appendChild(tag); - } - }, - - ajax : function (url, callback) { - var http = new XMLHttpRequest(); - http.open("GET",url,true); - http.onreadystatechange = function () { - if(http.readyState == 4) { callback(http); } - }; - http.send(null); - } - }, - - position : { - set : function (x,y) { - if (!x || !y) { - this.parent.editor.container.style.top = "25px"; - this.parent.editor.container.style.left = ""; - this.parent.editor.container.style.right = "25px"; - this.parent.editor.container.style.bottom = ""; - - var xy = this.get(); - x = xy[0]; - y = xy[1]; - } - this.parent.editor.container.style.top = y+"px"; - this.parent.editor.container.style.left = x+"px"; - this.parent.editor.container.style.right = ""; - this.parent.editor.container.style.bottom = ""; - }, - - get : function () { - // https://www.quirksmode.org/js/findpos.html - var left = 0; - var top = 0; - var obj = this.parent.editor.container; - if(obj.offsetParent) { - left = obj.offsetLeft; - top = obj.offsetTop; - while (obj = obj.offsetParent) { - left += obj.offsetLeft; - top += obj.offsetTop; - } - } - return [left,top]; - }, - - save : function (x,y) { - if (!x || !y) { - var xy = this.get(); - x = xy[0]; - y = xy[1]; - } - Cookies.set(config.title+"_tagger-position", x+" "+y, {expires: 14}); - }, - - load : function () { - var p = Cookies.get(config.title+"_tagger-position"); - if(p) { - var xy = p.split(" "); - this.set(xy[0],xy[1]); - } else { - this.set(); - } - } - } -}; diff --git a/ext/tagger/style.css b/ext/tagger/style.css deleted file mode 100644 index ba9f8407..00000000 --- a/ext/tagger/style.css +++ /dev/null @@ -1,103 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Tagger - Advanced Tagging v2 * - * Author: Artanis (Erik Youngren ) * - * Do not remove this notice. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#tagger_parent { - text-align:left; - position:fixed; - max-width:300px; - -} -#tagger_parent * { - background-color:#EEE; -} - -#tagger_titlebar { - background-color:#ddd; - border:2px solid; - cursor:move; - font-weight:bold; - -moz-border-radius:5px 5px 0 0; - padding:.25em; - text-align:center; -} - -#tagger_toolbar, #tagger_body { - padding:2px 2px 0 2px; - border-style:solid; - border-width: 0 2px 0 2px; -} -#tagger_body { - max-height:175px; - overflow-x:hidden; - overflow-y:auto; -} - -#tagger_statusbar { - background-color:#ddd; - border:2px solid; - font-weight: bold; - min-height:16px; - -moz-border-radius:0 0 5px 5px; - padding:.25em; -} #tagger_statusbar * { background-color:#ddd; } - -#tagger_body div { - padding-top:2px; - margin-top:2px; - border-top:1px solid; -} - -/* Tagger Styling - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#tagger_parent form { - display:inline; -} -#tagger_parent input { - width:auto; -} -#tagger_parent input[type=text] { - background-color:white; -} - -/* Custom Element Base Styles - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#tagger_parent list { - display: block; -} -#tagger_parent tag { - font-size:1.25em; - display:block; -} - -#tagger_parent list[id=image] tag:before { - content:url('./images/active.png'); -} - -#tagger_parent list[id=search] tag:before { - content:url('./images/inactive.png'); -} -/* Hovering */ -#tagger_parent tag:hover { - cursor:pointer; - background-color:#ddd; -} - -/*#tagger_parent list[id=image] tag:hover { - background-color:#faa; -} - -#tagger_parent list[id=search] tag:hover { - background-color:#afa; -}*/ - -#tagger_parent list[id=image] tag:hover:before { - content:url('./images/rem-tag.png'); -} - -#tagger_parent list[id=search] tag:hover:before { - content:url('./images/add-tag.png'); -} diff --git a/ext/tagger/theme.php b/ext/tagger/theme.php deleted file mode 100644 index a8fa9407..00000000 --- a/ext/tagger/theme.php +++ /dev/null @@ -1,75 +0,0 @@ -) * - * Do not remove this notice. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -class TaggerTheme extends Themelet -{ - public function build_tagger(Page $page, DisplayingImageEvent $event) - { - // Initialization code - $base_href = get_base_href(); - // TODO: AJAX test and fallback. - - $page->add_html_header(""); - $page->add_block(new Block( - null, - "", - "main", - 1000 - )); - - // Tagger block - $page->add_block(new Block( - null, - (string)$this->html($event->get_image()), - "main" - )); - } - private function html(Image $image) - { - global $config; - $h_query = isset($_GET['search'])? $h_query= "search=".url_escape($_GET['search']) : ""; - - $delay = $config->get_string("ext_tagger_search_delay", "250"); - - // TODO: option for initial Tagger window placement. - return DIV( - ["id"=>"tagger_parent", "style"=>"display:none; top:25px; right:25px;"], - DIV(["id"=>"tagger_titlebar"], "Tagger"), - DIV( - ["id"=>"tagger_toolbar"], - INPUT(["type"=>"text", "value"=>"", "id"=>"tagger_filter", "onkeyup"=>"Tagger.tag.search(this.value, $delay);"]), - INPUT(["type"=>"button", "value">"Add", "onclick"=>"Tagger.tag.create(byId('tagger_filter').value);"]), - FORM( - ["action"=>make_link("tag_edit/set"), "method"=>"POST", "onsubmit"=>"Tagger.tag.submit();"], - INPUT(["type"=>"hidden", "name"=>"image_id", "value"=>$image->id, "id"=>"image_id"]), - INPUT(["type"=>"hidden", "name"=>"query", "value"=>$h_query, "id"=>""]), - INPUT(["type"=>"hidden", "name"=>"source", "value"=>$image->source, "id"=>""]), - INPUT(["type"=>"hidden", "name"=>"tags", "value"=>"", "id"=>"tagger_tags"]), - INPUT(["type"=>"", "value"=>"Set"]), - ), - # UL(["id"=>"tagger_p-menu"]), - # BR(["style"=>"clear:both;"]), - ), - DIV( - ["id"=>"tagger_body"], - DIV(["id"=>"tagger_p-search", "name"=>"Searched Tags"]), - DIV(["id"=>"tagger_p-applied", "name"=>"Applied Tags"]), - ), - DIV( - ["id"=>"tagger_statusbar"], - ), - ); - } -} diff --git a/ext/tagger/webtoolkit.drag.js b/ext/tagger/webtoolkit.drag.js deleted file mode 100644 index 68d48f4a..00000000 --- a/ext/tagger/webtoolkit.drag.js +++ /dev/null @@ -1,87 +0,0 @@ -/*jshint bitwise:true, curly:true, forin:false, noarg:true, noempty:true, nonew:true, undef:true, strict:false, browser:true, jquery:true */ - -/** -* -* Crossbrowser Drag Handler -* http://www.webtoolkit.info/ -* -* Modified by Erik Youngren to move parent node -**/ - -var DragHandler = { - - - // private property. - _oElem : null, - - - // public method. Attach drag handler to an element. - attach : function(oElem) { - oElem.onmousedown = DragHandler._dragBegin; - - // callbacks - oElem.dragBegin = function () {}; - oElem.drag = function () {}; - oElem.dragEnd = function () {}; - - return oElem; - }, - - - // private method. Begin drag process. - _dragBegin : function(e) { - var oElem = DragHandler._oElem = this; - - if (isNaN(parseInt(oElem.parentNode.style.left))) { oElem.parentNode.style.left = '0px'; } - if (isNaN(parseInt(oElem.parentNode.style.top))) { oElem.parentNode.style.top = '0px'; } - - var x = parseInt(oElem.parentNode.style.left); - var y = parseInt(oElem.parentNode.style.top); - - e = e ? e : window.event; - oElem.mouseX = e.clientX; - oElem.mouseY = e.clientY; - - oElem.dragBegin(oElem, x, y); - - document.onmousemove = DragHandler._drag; - document.onmouseup = DragHandler._dragEnd; - return false; - }, - - - // private method. Drag (move) element. - _drag : function(e) { - var oElem = DragHandler._oElem; - - var x = parseInt(oElem.parentNode.style.left); - var y = parseInt(oElem.parentNode.style.top); - - e = e ? e : window.event; - oElem.parentNode.style.left = x + (e.clientX - oElem.mouseX) + 'px'; - oElem.parentNode.style.top = y + (e.clientY - oElem.mouseY) + 'px'; - - oElem.mouseX = e.clientX; - oElem.mouseY = e.clientY; - - oElem.drag(oElem, x, y); - - return false; - }, - - - // private method. Stop drag process. - _dragEnd : function() { - var oElem = DragHandler._oElem; - - var x = parseInt(oElem.parentNode.style.left); - var y = parseInt(oElem.parentNode.style.top); - - oElem.dragEnd(oElem, x, y); - - document.onmousemove = null; - document.onmouseup = null; - DragHandler._oElem = null; - } - -};