Tagger 20071002 1526

git-svn-id: file:///home/shish/svn/shimmie2/trunk@513 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
Artanis 2007-10-02 22:27:09 +00:00
parent 1e44f93c1f
commit c30fee9f0b
3 changed files with 19 additions and 6 deletions

View File

@ -41,6 +41,22 @@ class tagger extends Extension {
ORDER BY tag",array($tags_min));
$this->theme->build($page, $tags);
global $user;
if($tags->_numOfRows > 100 && $user->is_admin()) {
$page->add_block( new Block (
"Warning - ext/tagger",
"<h4>It is likely that Tagger will not function</h4>
Currently the javascript code chokes on large numbers of
tags. The tag list currently numbers
<b>{$tags->_numOfRows}</b>.<br/>
You can increase the minimum use requirement for the tag
list in the <a href='".make_link('setup')."'>Board Config</a>
to reduce the size of this list.<br/>
This is a limitation of the method in which Tagger operates.
I am working on a solution, I do not know when such a
solution will be ready.",
"main",0));
}
}
if(is_a($event,"PageRequestEvent")) {

View File

@ -10,8 +10,6 @@
var remove_tagme = null;
var tags_field = false;
var set_button = false;
// TODO: Store tagger's list here? Wouldn't need to get the elements every time,
// but memory overhead?
// Put everything in a class? better?
@ -26,7 +24,7 @@ function taggerInit() {
c = c ? c.replace(/px/g,"").split(" ") : new Array(null,null);
taggerResetPos(c[0],c[1]);
tagger_tagIndicators()
tagger_tagIndicators();
DragHandler.attach(byId("tagger_titlebar"));
remove_tagme = byId('tagme');
@ -69,7 +67,6 @@ function taggerSavePosition() {
}
function tagger_tagIndicators() {
tags = byId("tags");
arObjTags = getElementsByTagNames('a',byId('tagger_body'));
for (i in arObjTags) {

View File

@ -30,8 +30,6 @@ class taggerTheme extends Themelet {
}
$html = "
<img src='$base_href/ext/tagger/onload.gif' style='display:none;'
onload='taggerInit();' />
<div style='font-size:0.7em;'>
Collapse this block to hide Tagger
</div>
@ -62,6 +60,8 @@ class taggerTheme extends Themelet {
class='tagger_js' >Refresh Filter</a>
</div>
<div id='tagger_body'>$h_tags</div>
<img src='$base_href/ext/tagger/onload.gif' style='display:none;'
onload='taggerInit();' />
</div>";
$page->add_block( new Block(