.WmkwsPopup -> .mkwsPopup
authorWolfram Schneider <wosch@indexdata.dk>
Thu, 10 Jul 2014 11:46:22 +0000 (11:46 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Thu, 10 Jul 2014 11:46:22 +0000 (11:46 +0000)
You'd need to do:

<div class="mkwsPopup" [popup options ....]>
  <div class="mkwsCredo"/>
</div>

examples/htdocs/popup.html
src/mkws-popup.js

index eea60ca..3857741 100644 (file)
@@ -41,7 +41,7 @@
     <h3>MKWS widgets in a popup window</h3>
 
     <div class="mkwsSearch"></div>
-    <div class="WmkwsPopup mkwsTeam_search" popup_width="1024" popup_height="650" popup_modal="0" popup_autoOpen="0" popup_button="input.mkwsButton">
+    <div class="mkwsPopup" popup_width="1024" popup_height="650" popup_modal="0" popup_autoOpen="0" popup_button="input.mkwsButton">
       <div class="mkwsSwitch"></div>
       <div class="mkwsLang"></div>
       <div class="mkwsResults"></div>
       <div class="mkwsStat"></div>
     </div>
 
-    <div class="mkwsCredo WmkwsPopup mkwsTeam_credo" popup_width="1024" popup_height="800" popup_autoOpen="1" autosearch="!param!q">
-      mkwsCredo result will appear here
+    <div class="mkwsPopup popup_width="1024" popup_height="800" popup_autoOpen="1">
+      <div class="mkwsCredo mkwsTeam_credo" autosearch="!param!q">mkwsCredo result will appear here</div>
     </div>
 
-    <div class="mkwsReference WmkwsPopup mkwsTeam_credo" popup_width="700" popup_height="600" popup_autoOpen="1" sentences="1" autosearch="!param!q">
-      mkwsReference result will appear here
+    <div class="mkwsPopup" popup_width="700" popup_height="600" popup_autoOpen="1">
+      <div class="mkwsReference mkwsTeam_credo" sentences="1" autosearch="!param!q">mkwsReference result will appear here</div>
     </div>
 
   </body>
 </html>
-
index ca38e5d..6282ceb 100644 (file)
@@ -3,8 +3,8 @@
  */
 
 // "use strict";
-$(document).ready(function () {
-// mkws.registerWidgetType('WmkwsPopup', function() {
+// $(document).ready(function () {
+mkws.registerWidgetType('Popup', function() {
     var $ = mkws.$;
     var debug = mkws.log;
     debug("init popup window");
@@ -14,7 +14,9 @@ $(document).ready(function () {
         return;
     }
 
-    var popup_window = $(".WmkwsPopup");
+    // var popup_window = $(this.node); //
+    var popup_window = $(".mkwsPopup");
+    
     if (!popup_window) {
         debug("no popup found, skip");
         return;