# HG changeset patch # User Zoe Hong # Date 1424365871 -3600 # Node ID 1f98c92ebbfbd059babd114b746ce38855d3f998 # Parent ac77748bb8136e0d9a4b3bc9485b499db43d5d61 first version of UI layout. Very roughly, but works in the fixed sidebar, head line, popups and so on. diff -r ac77748bb813 -r 1f98c92ebbfb develop/models/extractapp.php --- a/develop/models/extractapp.php Thu Feb 19 11:07:27 2015 +0100 +++ b/develop/models/extractapp.php Thu Feb 19 18:11:11 2015 +0100 @@ -156,7 +156,8 @@ $data['topiclistArray'] = $topiclistArray; $data['default_topic_id'] = $this->GetTopic(); $data['topic_tag'] = $this->GetTopicTag($this->GetTopic()); - + $data['topic_name'] = $this->GetTopicName($this->GetTopic()); + $data['info'] = array('file_id'=>$this->file_id, 'user_id'=>$this->user_id, 'branch_id'=>$this->branch_id, 'section_id'=>$this->section_id); $data['messages'] = $this->messages; @@ -622,6 +623,13 @@ return $tag; } + private function GetTopicName($topic_id) { + $result = $this->GetTopicByID($topic_id); + $row = mysql_fetch_assoc($result); + $name = $row['name']; + return $name; + + } // =========================== diff -r ac77748bb813 -r 1f98c92ebbfb develop/views/Extractapp/taggingtext.php --- a/develop/views/Extractapp/taggingtext.php Thu Feb 19 11:07:27 2015 +0100 +++ b/develop/views/Extractapp/taggingtext.php Thu Feb 19 18:11:11 2015 +0100 @@ -6,6 +6,7 @@ $section_id = $viewmodel['section_id']; $topiclistArray = $viewmodel['topiclistArray']; $default_topic_id = $viewmodel['default_topic_id']; +$topic_name = $viewmodel['topic_name']; $topic_tag = $viewmodel['topic_tag']; $info = $viewmodel['info']; $messages = $viewmodel['messages']; @@ -125,7 +126,9 @@ newdiv.id = "tagItemDivId"; newdiv.setAttribute("class", "tagItemDivClass"); newdiv.style.cssText = 'top:'+e.pageY+'; left:'+e.pageX+'; position:absolute; background-color: white; border:1px solid black; padding: 5px'; - + newdiv.style.backgroundColor = "white"; + newdiv.style.zIndex = 2; + //console.log(selection.getRangeAt(0).cloneContents()); if ( container.innerHTML.indexOf( "br" ) != -1 ) { var newselect = document.createElement("select"); @@ -168,7 +171,7 @@ [TopicTag]Tag as:".$taglistValue[1]."(necessary for this topic!)\";\n"; + echo "newdiv.innerHTML += \"\";\n"; echo "newdiv.innerHTML += \"\";\n"; echo "newdiv.innerHTML += \"
\";\n"; break; @@ -203,6 +206,8 @@ } ?> } + + $('#tagItemDivId').addClass(); // tagItemDivId is newdiv's id $('body').append(newdiv); $('#TitletagType').val(lastAddTag); @@ -323,10 +328,8 @@ function chooseTopic(default_topic_id) { var t = JSON.parse( '' ); - var info = JSON.parse(''); - $('#load_topic_div').html(""); $('#load_topic_div').css("display", "block"); @@ -336,25 +339,21 @@ $('#load_topic_div').css("height", "50px"); $('#load_topic_div').css("top", "20px"); $('#load_topic_div').css("left", "-150px"); - + var topic_select = document.createElement("select"); topic_select.id = "loadTopiclist"; var selected_topic = t[0]; topic_select.onchange = function(){ - selected_topic = topic_select.options[topic_select.selectedIndex]; console.log(selected_topic.text); var topic_id = selected_topic.value; - // var topic_name = selected_topic.text; - var form = document.createElement("form"); form.setAttribute("method", "post"); form.setAttribute("action", "./TaggingText"); // hand to controller - //form.setAttribute("action", "./"+section_id); // hand to controller form.setAttribute("target", "_self"); var hiddenField = document.createElement("input"); @@ -369,10 +368,8 @@ _postForContineTagging(form); - }; - //Create and append the options for (var i = 0; i < t.length; i++) { console.log(t[i]['id']+","+t[i]['name']); @@ -387,10 +384,9 @@ $('#load_topic_div').append(topic_select); - var newbutton = document.createElement("button"); $(newbutton).html("Close"); - $(newbutton).addClass("btn btn-default"); + $(newbutton).addClass("btn btn-xs btn-default"); $(newbutton).attr("onclick", "$('#load_topic_div').css(\"display\", \"none\");"); $('#load_topic_div').append(newbutton); @@ -488,61 +484,63 @@ }) +
-
-

-
-
- -
-
+
+

+
+ + + + +
-
- - - - + + +
- -

Config Topic

- - -
-
-

Replace By Smart Regex©:

+
Config Topic:
+
current topic is + +
+
+
+ +
+
Replace By Smart Regex©:


Range: to
@@ -551,15 +549,13 @@
- -
-

Tag by rule:

+
Tag by rule:


@@ -568,7 +564,7 @@
-

Edit:

+
Edit:

@@ -580,14 +576,14 @@
-

Export:

+
Export:
Page: to


-

Replace By Regex:

+
Replace By Regex:
Range: to
Regex:
Replace:
@@ -596,108 +592,16 @@
+ +
+
+ +
+
- - - - - -
-
-
-
- - - -
- -
-
- Replace By Smart Regex©: -

-
- Range: to
-
-
- - -
-
- -
- Tag by rule: -
-
- - - -
- -
- Edit: -
- - -
-
-
-
-
-
- -
- Export: - Page: to
-
-
-
- -
- Replace By Regex: - Range: to
- Regex:
- Replace:
- -
-
-
-
- - -