Mercurial > hg > extraction-interface
diff views/Extractapp/TaggingText.php @ 66:e71a437ae49f extractapp
New: responsive. some css style
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Thu, 02 Apr 2015 16:33:46 +0200 |
parents | f9ae94a9b041 |
children | 3ada9334ebfc |
line wrap: on
line diff
--- a/views/Extractapp/TaggingText.php Thu Apr 02 11:45:09 2015 +0200 +++ b/views/Extractapp/TaggingText.php Thu Apr 02 16:33:46 2015 +0200 @@ -141,7 +141,6 @@ var el=$('#follow-scroll'); var originalelpos=el.offset().top; // take it where it originally is on the page - //run on scroll $(window).scroll(function(){ var el = $('#follow-scroll'); // important! (local) @@ -338,6 +337,9 @@ } //e.stopPropagation(); + + + }); @@ -666,14 +668,14 @@ $('#load_topic_div').html(""); $('#load_topic_div').css("display", "block"); - + /* $('#load_topic_div').css("border", "1px solid black"); $('#load_topic_div').css("background-color", "White"); $('#load_topic_div').css("width", "200px"); $('#load_topic_div').css("height", "50px"); $('#load_topic_div').css("top", "20px"); $('#load_topic_div').css("left", "-200px"); - + */ var topic_select = document.createElement("select"); topic_select.id = "loadTopiclist"; @@ -834,13 +836,12 @@ } - $(document).on("change", '#smartRegexPopUpSelectWord', function (e) { var wordlistArray = JSON.parse('<?php echo json_encode($wordlistArray) ?>'); for (var i = 0; i < wordlistArray.length; i++) { - var wordlistValue = wordlistArray[i]; - if ($('#smartRegexPopUpSelectWord').val() == wordlistValue[0]) { + var wordlistValue = wordlistArray[i]; // wordlistValue is array(id, name, listString) + if ($('#smartRegexPopUpSelectWord').val() == wordlistValue[0]) { var textarea_text = $('#smartRegexPopUpText').val(); // insert selected wordlist into textarea at cursor position var cursorPosition = $('#smartRegexPopUpText').prop("selectionStart"); @@ -852,11 +853,8 @@ $('#smartRegexPopUpText').val( text_before_cursor+"["+wordlistValue[2]+"]{1,1}"+text_after_cursor); } } - }); - - </script> <div id="dialog-form" title="config tags for topic" style="position:fixed; top: 30px; "> @@ -871,16 +869,16 @@ <div class="bg-default"> <?php echo $messages['debug']; ?> </div> </div> -<table width="1270" border="1" style="margin:10 30 30 30;"> +<table width="1270" border="1" style="margin:10 30 30 30; width:100%; max-width:1270px"> <tr> <td width="980" style="padding:0 5 0 5; margin: 0 5 0 5;"> - <div id="editable-area" class="area" style="max-width: 980"><?php echo $stringInput; ?></div> + <div id="editable-area" class="area" style="max-width:980px; min-width:400px"><?php echo $stringInput; ?></div> </td> - <td width="290" valign="top"> + <td width="290" valign="top" style="min-width:280px"> <div id="popups" style="position:absolute; width:300px; "> - <div id="load_topic_div" style="position: absolute; display: none; z-index:2"></div> - <div id="load_regex_div" style="position: absolute; display: none; z-index:2;"></div> - <div id="smartRegexPopUpDiv" style="position: absolute; display: none; z-index:2"> + <div id="load_topic_div" class="popup-topic popup-frame"></div> + <div id="load_regex_div" class="popup-loadregex popup-frame"></div> + <div id="smartRegexPopUpDiv" class="popup-regex popup-frame"> Name: <input id="smartRegexPopUpName"></input><br><br> Word List: <select id="smartRegexPopUpSelectWord"> @@ -904,16 +902,16 @@ ?> <option value="NOTAG">不標記</option> </select><br> - <button id="smartRegexPopUpAdd" onclick="replaceSmartAdd()" class="btn btn-info" style="">Add</button> - <button id="smartRegexPopUpEdit" onclick="replaceSmartEdit()" class="btn btn-success" style="">Edit/Update</button> - <button id="smartRegexPopUpDel" onclick="replaceSmartDel()" class="btn btn-danger" style="">Delete</button> - <button id="smartRegexPopUpBack" onclick="replaceSmartBack()" class="btn btn-default" style=""><<</button> - <button id="smartRegexPopUpFor" onclick="replaceSmartFor()" class="btn btn-default" style="">>></button> - <button onclick="replaceSmartClose()" class="btn btn-default" style="">Close</button> + <button id="smartRegexPopUpAdd" onclick="replaceSmartAdd()" class="btn btn-info">Add</button> + <button id="smartRegexPopUpEdit" onclick="replaceSmartEdit()" class="btn btn-success">Edit/Update</button> + <button id="smartRegexPopUpDel" onclick="replaceSmartDel()" class="btn btn-danger">Delete</button> + <button id="smartRegexPopUpBack" onclick="replaceSmartBack()" class="btn btn-default"><<</button> + <button id="smartRegexPopUpFor" onclick="replaceSmartFor()" class="btn btn-default">>></button> + <button onclick="replaceSmartClose()" class="btn btn-default" >Close</button> </div> </div> - <div id="follow-scroll" style="position:absolute; height:680px; overflow:scroll; margin:0 5 15 5; max-width:280px"> + <div id="follow-scroll"> <form action="javascript:void(0);"> <fieldset> <legend><h5 class="text-success"> Config Topic: </h5></legend>