Author: ssmiweve
Date: 2009-03-12 13:05:11 +0100 (Thu, 12 Mar 2009)
New Revision: 7221

Added:
   
branches/2.18/generic.sesam/sesam.com/war/src/main/webapp/WEB-INF/classes/fragments/layout/sesam.com/mwsuggest.jsp
Modified:
   branches/2.18/generic.sesam/sesam.com/war/src/main/conf/views.xml
   
branches/2.18/generic.sesam/sesam.com/war/src/main/webapp/WEB-INF/classes/fragments/layout/sesam.com/head.jsp
Log:
http://permalink.gmane.org/gmane.comp.java.sesat.kernel.devel/248


Modified: branches/2.18/generic.sesam/sesam.com/war/src/main/conf/views.xml
===================================================================
--- branches/2.18/generic.sesam/sesam.com/war/src/main/conf/views.xml   
2009-03-10 11:43:25 UTC (rev 7220)
+++ branches/2.18/generic.sesam/sesam.com/war/src/main/conf/views.xml   
2009-03-12 12:05:11 UTC (rev 7221)
@@ -39,6 +39,7 @@
         </navigation>
         <layout main="sesam.com/main.jsp" front="sesam.com/index.jsp">
             <include key="head-element" template="sesam.com/head.jsp"/>
+            <include key="head-element-extra" 
template="sesam.com/mwsuggest.jsp"/>
             <include key="top-col-one" template="sesam.com/searchbar-top.jsp"/>
             <include key="main-col-three" 
template="sesam.com/globalSearch.jsp"/>
             <include key="bottom-col-one" 
template="sesam.com/offsetPager.jsp"/>

Modified: 
branches/2.18/generic.sesam/sesam.com/war/src/main/webapp/WEB-INF/classes/fragments/layout/sesam.com/head.jsp
===================================================================
--- 
branches/2.18/generic.sesam/sesam.com/war/src/main/webapp/WEB-INF/classes/fragments/layout/sesam.com/head.jsp
       2009-03-10 11:43:25 UTC (rev 7220)
+++ 
branches/2.18/generic.sesam/sesam.com/war/src/main/webapp/WEB-INF/classes/fragments/layout/sesam.com/head.jsp
       2009-03-12 12:05:11 UTC (rev 7221)
@@ -20,7 +20,6 @@
  *   You should have received a copy of the GNU Affero General Public License
  *   along with SESAT.  If not, see <http://www.gnu.org/licenses/>.
  *
-    Author     : mick
     Version    : $Id$
 -->
 <title><c:if test="${not empty 
DataModel.query.utf8UrlEncoded}">${DataModel.query.xmlEscaped} - </c:if> 
Sesam</title>
@@ -63,52 +62,5 @@
         <script type='text/javascript' 
src="${js_link}"><![CDATA[&nbsp;]]></script>
     </c:if>
 </c:forEach>
-<!-- MediaWiki Suggest definitions -->
-<script type='text/javascript'><jsp:text><![CDATA[
-var wgMWSuggestTemplate = "/search/?q=\"{searchTerms}\"&c=suggest";
-var wgMWSuggestMessages = ["]]></jsp:text><search:text 
key="mwsuggest_with_suggestions"/><jsp:text><![CDATA[", 
"]]></jsp:text><search:text 
key="mwsuggest_no_suggestions"/><jsp:text><![CDATA["];
-// these pairs of inputs/forms will be autoloaded at startup
-var os_autoload_inputs = new Array('inputBox');//,'inputBox');
-var os_autoload_forms = new Array('sf');//,'sf-bottom');
-
-// search_box_id -> Results object
-var os_map = {};
-// cached data, url -> json_text
-var os_cache = {};
-// global variables for suggest_keypress
-var os_cur_keypressed = 0;
-var os_last_keypress = 0;
-var os_keypressed_count = 0;
-// type: Timer
-var os_timer = null;
-// tie mousedown/up events
-var os_mouse_pressed = false;
-var os_mouse_num = -1;
-// if true, the last change was made by mouse (and not keyboard)
-var os_mouse_moved = false;
-// delay between keypress and suggestion (in ms)
-var os_search_timeout = 250;
-// if we stopped the service
-var os_is_stopped = false;
-// max lines to show in suggest table
-var os_max_lines_per_suggest = 99;
-// number of steps to animate expansion/contraction of container width
-var os_animation_steps = 6;
-// num of pixels of smallest step
-var os_animation_min_step = 2;
-// delay between steps (in ms)
-var os_animation_delay = 30;
-// max width of container in percent of normal size (1 == 100%)
-var os_container_max_width = 2;
-// currently active animation timer
-var os_animation_timer = null;
-
-var resultTableHtmlPrefix = null;
-var resultTableHtmlSuffix = null;
-var os_suggest_result_padding = 4;
-]]></jsp:text></script>
-<c:set var="mwsuggestjs_link"><search:findResource 
url="/javascript/external/mwsuggest.js"/></c:set>
-<script type='text/javascript' 
src="${mwsuggestjs_link}"><![CDATA[&nbsp;]]></script>
-<c:set var="mwsuggestcss_link"><search:findResource 
url="/css/external/mwsuggest.css"/></c:set>
-<link rel="stylesheet" type="text/css" href="${mwsuggestcss_link}" 
media="screen"><![CDATA[&nbsp;]]></link>
+<search:include include="head-element-extra"/>
 </jsp:root>

Added: 
branches/2.18/generic.sesam/sesam.com/war/src/main/webapp/WEB-INF/classes/fragments/layout/sesam.com/mwsuggest.jsp
===================================================================
--- 
branches/2.18/generic.sesam/sesam.com/war/src/main/webapp/WEB-INF/classes/fragments/layout/sesam.com/mwsuggest.jsp
                          (rev 0)
+++ 
branches/2.18/generic.sesam/sesam.com/war/src/main/webapp/WEB-INF/classes/fragments/layout/sesam.com/mwsuggest.jsp
  2009-03-12 12:05:11 UTC (rev 7221)
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jsp:root version="2.0"
+    xmlns:jsp="http://java.sun.com/JSP/Page";
+    xmlns:c="http://java.sun.com/jsp/jstl/core";
+    xmlns:search="urn:jsptld:/WEB-INF/SearchPortal.tld"><!-- XXX a little 
awkward since this never exists in the skin -->
+<!-- 
+ * Copyright (2009) Schibsted Søk AS
+ *   This file is part of SESAT.
+ *
+ *   SESAT is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU Affero General Public License as published 
by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   SESAT is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU Affero General Public License for more details.
+ *
+ *   You should have received a copy of the GNU Affero General Public License
+ *   along with SESAT.  If not, see <http://www.gnu.org/licenses/>.
+ *
+    Version    : $Id$
+-->
+<!-- MediaWiki Suggest definitions -->
+<script type='text/javascript'><jsp:text><![CDATA[
+var wgMWSuggestTemplate = "/search/?q=\"{searchTerms}\"&c=suggest";
+var wgMWSuggestMessages = ["]]></jsp:text><search:text 
key="mwsuggest_with_suggestions"/><jsp:text><![CDATA[", 
"]]></jsp:text><search:text 
key="mwsuggest_no_suggestions"/><jsp:text><![CDATA["];
+// these pairs of inputs/forms will be autoloaded at startup
+var os_autoload_inputs = new Array('inputBox');//,'inputBox');
+var os_autoload_forms = new Array('sf');//,'sf-bottom');
+
+// search_box_id -> Results object
+var os_map = {};
+// cached data, url -> json_text
+var os_cache = {};
+// global variables for suggest_keypress
+var os_cur_keypressed = 0;
+var os_last_keypress = 0;
+var os_keypressed_count = 0;
+// type: Timer
+var os_timer = null;
+// tie mousedown/up events
+var os_mouse_pressed = false;
+var os_mouse_num = -1;
+// if true, the last change was made by mouse (and not keyboard)
+var os_mouse_moved = false;
+// delay between keypress and suggestion (in ms)
+var os_search_timeout = 250;
+// if we stopped the service
+var os_is_stopped = false;
+// max lines to show in suggest table
+var os_max_lines_per_suggest = 99;
+// number of steps to animate expansion/contraction of container width
+var os_animation_steps = 6;
+// num of pixels of smallest step
+var os_animation_min_step = 2;
+// delay between steps (in ms)
+var os_animation_delay = 30;
+// max width of container in percent of normal size (1 == 100%)
+var os_container_max_width = 2;
+// currently active animation timer
+var os_animation_timer = null;
+
+var resultTableHtmlPrefix = null;
+var resultTableHtmlSuffix = null;
+var os_suggest_result_padding = 4;
+]]></jsp:text></script>
+<c:set var="mwsuggestjs_link"><search:findResource 
url="/javascript/external/mwsuggest.js"/></c:set>
+<script type='text/javascript' 
src="${mwsuggestjs_link}"><![CDATA[&nbsp;]]></script>
+<c:set var="mwsuggestcss_link"><search:findResource 
url="/css/external/mwsuggest.css"/></c:set>
+<link rel="stylesheet" type="text/css" href="${mwsuggestcss_link}" 
media="screen"><![CDATA[&nbsp;]]></link>
+</jsp:root>

_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits

Reply via email to