Browse Source

HUE-897 Ported Search to Hue 3

Enrico Berti 12 năm trước cách đây
mục cha
commit
e68c45c7da

+ 2 - 1
apps/search/src/search/templates/admin_collection_facets.mako

@@ -38,7 +38,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
     <script src="/static/ext/js/knockout.x-editable.js"></script>
 
     <form method="POST" class="form-horizontal" data-bind="submit: submit">
-
+      <div class="well">
       <div class="section">
         <div class="alert alert-info">
           <div class="pull-right" style="margin-top: 10px">
@@ -222,6 +222,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
         <a id="nextBtn" class="btn btn-primary disable-feedback">${ _('Next') }</a>
         <button type="submit" class="btn btn-primary" data-bind="visible: isSaveBtnVisible()" id="save-facets">${_('Save')}</button>
       </div>
+    </div>
     </form>
   </%def>
 </%layout:skeleton>

+ 2 - 0
apps/search/src/search/templates/admin_collection_highlighting.mako

@@ -35,6 +35,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
 
   <%def name="content()">
     <form method="POST" class="form" data-bind="submit: submit">
+      <div class="well">
       <div class="section">
         <div class="alert alert-info">
           <div class="pull-right" style="margin-top: 10px">
@@ -59,6 +60,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
       <div class="form-actions" style="margin-top: 80px">
         <button type="submit" class="btn btn-primary" id="save-btn">${_('Save')}</button>
       </div>
+      </div>
     </form>
   </%def>
 </%layout:skeleton>

+ 3 - 1
apps/search/src/search/templates/admin_collection_properties.mako

@@ -49,7 +49,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
 
   <%def name="content()">
   <form method="POST">
-    <ul class="nav nav-tabs">
+    <ul class="nav nav-tabs" style="margin-bottom:0; margin-top:10px">
       <li class="active">
         <a href="#index" data-toggle="tab">${_('Collection')}</a>
       </li>
@@ -60,6 +60,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
         <a href="#properties" data-toggle="tab">${_('Indexes')}</a>
       </li>
     </ul>
+    <div class="well">
     <div class="tab-content">
       <div class="tab-pane active" id="index">
         <div class="fieldWrapper">
@@ -81,6 +82,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
         ${_('Loading...')} <img src="/static/art/spinner.gif">
       </div>
     </div>
+    </div>
   </form>
   </%def>
 

+ 20 - 30
apps/search/src/search/templates/admin_collection_properties_solr_properties.mako

@@ -22,33 +22,23 @@
 <%namespace name="macros" file="macros.mako" />
 
 
-<%layout:skeleton>
-  <%def name="no_navigation()">
-  </%def>
-
-  <%def name="title()">
-  </%def>
-
-  <%def name="content()">
-    <div class="tab-content">
-      <div class="tab-pane active" id="index_properties">
-        <table class="table">
-          <thead>
-          <tr>
-            <th width="20%">${_('Property')}</th>
-            <th>${_('Value')}</th>
-          </tr>
-          </thead>
-          <tbody>
-          <tr>
-            % for key, value in solr_collection.iteritems():
-              <td>${ key }</td>
-              <td>${ value }</td>
-            % endfor
-          </tr>
-          </tbody>
-        </table>
-      </div>
-    </div>
-  </%def>
-</%layout:skeleton>
+<div class="tab-content">
+  <div class="tab-pane active" id="index_properties">
+    <table class="table">
+      <thead>
+      <tr>
+        <th width="20%">${_('Property')}</th>
+        <th>${_('Value')}</th>
+      </tr>
+      </thead>
+      <tbody>
+      <tr>
+        % for key, value in solr_collection.iteritems():
+          <td>${ key }</td>
+          <td>${ value }</td>
+        % endfor
+      </tr>
+      </tbody>
+    </table>
+  </div>
+</div>

+ 2 - 0
apps/search/src/search/templates/admin_collection_sorting.mako

@@ -40,6 +40,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
     <script src="/static/ext/js/knockout.x-editable.js"></script>
 
     <form method="POST" class="form-horizontal" data-bind="submit: submit">
+      <div class="well">
       <div class="section">
         <div class="alert alert-info">
           <div class="pull-right" style="margin-top: 10px">
@@ -87,6 +88,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
       <div class="form-actions" style="margin-top: 80px">
         <button type="submit" class="btn btn-primary" id="save-sorting">${_('Save')}</button>
       </div>
+      </div>
     </form>
   </%def>
 </%layout:skeleton>

+ 39 - 54
apps/search/src/search/templates/admin_collection_template.mako

@@ -122,14 +122,16 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
     overflow: inherit;
   }
 
-  .chzn-container, .chzn-select {
+  .chosen-container, .chosen-select {
     float: left;
   }
 
   .plus-btn {
     float: left;
+    height: 25px;
+    line-height: 15px!important;
     margin-left: 4px;
-    height: 30px;
+    min-height: 25px;
   }
 </style>
 
@@ -143,15 +145,15 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
   </%def>
 
   <%def name="content()">
-    <ul class="nav nav-tabs">
+    <ul class="nav nav-tabs" style="margin-bottom:0; margin-top:10px">
       <li class="active"><a href="#visual" data-toggle="tab">${_('Visual Editor')}</a></li>
       <li><a href="#preview" data-toggle="tab">${_('Preview')}</a></li>
       <li><a href="#source" data-toggle="tab">${_('Source')}</a></li>
       <li><a href="#extra" data-toggle="tab">${_('Advanced')}</a></li>
     </ul>
+    <div class="well">
     <div class="tab-content">
       <div class="tab-pane active" id="visual">
-
         <div class="row-fluid">
           <div class="span9">
             <div id="toolbar"></div>
@@ -163,30 +165,22 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
             </div>
           </div>
           <div class="span3">
-            <div class="widget-box">
-              <div class="widget-title">
-                <span class="icon">
-                  <i class="icon-th-list"></i>
-                </span>
-                <h5>${_('Available Fields')}</h5>
-              </div>
-              <div class="widget-content">
-                <select data-bind="options: availableFields, value: selectedVisualField" class="input-large chzn-select"></select>
-                <button title="${ _('Click on this button to add the field') }" class="btn btn-small plus-btn" data-bind="click: $root.addFieldToVisual">
-                  <i class="icon-plus"></i>
-                </button>
-                <div class="clearfix"></div>
+            <div class="card card-home">
+              <h2 class="card-heading simple">${_('Available Fields')}</h2>
+              <div class="card-body">
+                <p>
+                  <select data-bind="options: availableFields, value: selectedVisualField" class="input-large chosen-select"></select>
+                  <button title="${ _('Click on this button to add the field') }" class="btn plus-btn" data-bind="click: $root.addFieldToVisual">
+                    <i class="icon-plus"></i>
+                  </button>
+                  <div class="clearfix"></div>
+                </p>
               </div>
             </div>
-            <div class="widget-box">
-              <div class="widget-title">
-                <span class="icon">
-                  <i class="icon-magic"></i>
-                </span>
-                <h5>${_('Available Functions')}</h5>
-              </div>
-              <div class="widget-content">
-                <select id="visualFunctions" data-bind="value: selectedVisualFunction" class="input-large chzn-select">
+            <div class="card card-home">
+              <h2 class="card-heading simple">${_('Available Functions')}</h2>
+              <div class="card-body">
+                <select id="visualFunctions" data-bind="value: selectedVisualFunction" class="input-large chosen-select">
                   <option title="${ _('Formats date or timestamp in DD-MM-YYYY') }" value="{{#date}} {{/date}}">{{#date}}</option>
                   <option title="${ _('Formats date or timestamp in HH:mm:ss') }" value="{{#time}} {{/time}}">{{#time}}</option>
                   <option title="${ _('Formats date or timestamp in DD-MM-YYYY HH:mm:ss') }" value="{{#datetime}} {{/datetime}}">{{#datetime}}</option>
@@ -200,7 +194,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
                   <option title="${ _('Truncate a value after 250 characters') }" value="{{#truncate250}} {{/truncate250}}">{{#truncate250}}</option>
                   <option title="${ _('Truncate a value after 500 characters') }" value="{{#truncate500}} {{/truncate500}}">{{#truncate500}}</option>
                 </select>
-                <button title="${ _('Click on this button to add the field') }" class="btn btn-small plus-btn" data-bind="click: $root.addFunctionToVisual">
+                <button title="${ _('Click on this button to add the field') }" class="btn plus-btn" data-bind="click: $root.addFunctionToVisual">
                   <i class="icon-plus"></i>
                 </button>
                 <div class="clearfix"></div>
@@ -209,39 +203,30 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
             </div>
           </div>
         </div>
-
-
       </div>
+
       <div class="tab-pane" id="source">
         <div class="row-fluid">
           <div class="span9" style="padding-top: 10px">
             <textarea id="template-source"></textarea>
           </div>
           <div class="span3">
-            <div class="widget-box">
-              <div class="widget-title">
-                <span class="icon">
-                  <i class="icon-th-list"></i>
-                </span>
-                <h5>${_('Available Fields')}</h5>
-              </div>
-              <div class="widget-content">
-                <select data-bind="options: availableFields, value: selectedSourceField" class="input-medium chzn-select"></select>
-                <button title="${ _('Click on this button to add the field') }" class="btn btn-small plus-btn" data-bind="click: $root.addFieldToSource">
-                  <i class="icon-plus"></i>
-                </button>
-                <div class="clearfix"></div>
+            <div class="card card-home">
+              <h2 class="card-heading simple">${_('Available Fields')}</h2>
+              <div class="card-body">
+                <p>
+                  <select data-bind="options: availableFields, value: selectedSourceField" class="input-medium chosen-select"></select>
+                  <button title="${ _('Click on this button to add the field') }" class="btn plus-btn" data-bind="click: $root.addFieldToSource">
+                    <i class="icon-plus"></i>
+                  </button>
+                  <div class="clearfix"></div>
+                </p>
               </div>
             </div>
-            <div class="widget-box">
-              <div class="widget-title">
-                <span class="icon">
-                  <i class="icon-magic"></i>
-                </span>
-                <h5>${_('Available Functions')}</h5>
-              </div>
-              <div class="widget-content">
-                <select id="sourceFunctions" data-bind="value: selectedSourceFunction" class="input-medium chzn-select">
+            <div class="card card-home">
+              <h2 class="card-heading simple">${_('Available Functions')}</h2>
+              <div class="card-body">
+                <select id="sourceFunctions" data-bind="value: selectedSourceFunction" class="input-medium chosen-select">
                   <option title="${ _('Formats a date in the DD-MM-YYYY format') }" value="{{#date}} {{/date}}">{{#date}}</option>
                   <option title="${ _('Formats a date in the HH:mm:ss format') }" value="{{#time}} {{/time}}">{{#time}}</option>
                   <option title="${ _('Formats a date in the DD-MM-YYYY HH:mm:ss format') }" value="{{#datetime}} {{/datetime}}">{{#datetime}}</option>
@@ -255,7 +240,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
                   <option title="${ _('Truncate a value after 250 characters') }" value="{{#truncate250}} {{/truncate250}}">{{#truncate250}}</option>
                   <option title="${ _('Truncate a value after 500 characters') }" value="{{#truncate500}} {{/truncate500}}">{{#truncate500}}</option>
                 </select>
-                <button title="${ _('Click on this button to add the field') }" class="btn btn-small plus-btn" data-bind="click: $root.addFunctionToSource">
+                <button title="${ _('Click on this button to add the field') }" class="btn plus-btn" data-bind="click: $root.addFunctionToSource">
                   <i class="icon-plus"></i>
                 </button>
                 <div class="clearfix"></div>
@@ -402,7 +387,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
         <button type="button" id="load-template-btn" href="#" class="btn btn-primary" disabled="disabled">${_('Insert layout')}</button>
       </div>
     </div>
-
+    </div>
   </%def>
 </%layout:skeleton>
 
@@ -530,7 +515,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
 
     var viewModel = new ViewModel();
     ko.applyBindings(viewModel);
-    $(".chzn-select").chosen();
+    $(".chosen-select").chosen({width: "75%"});
 
     var samples = ${ sample_data | n,unicode };
     var templateSourceEl = $("#template-source")[0];

+ 10 - 14
apps/search/src/search/templates/admin_collections.mako

@@ -35,21 +35,21 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
 
 
 <div class="container-fluid">
-
+  <div class="card">
   <%actionbar:render>
     <%def name="search()">
-      <input type="text" placeholder="${_('Filter collections by name...')}" class="input-xlarge search-query" id="filterInput">
+      <input type="text" placeholder="${_('Filter collections by name...')}" class="input-xlarge search-query" id="filterInput" data-bind="visible: collections().length > 0 && !isLoading()">
     </%def>
 
     <%def name="creation()">
-      <button id="importBtn" type="button" class="btn"><i class="icon-plus-sign"></i> ${ _('Import') }</button>
+      <button type="button" class="btn importBtn" data-bind="visible: collections().length > 0 && !isLoading()"><i class="icon-plus-sign"></i> ${ _('Import') }</button>
     </%def>
   </%actionbar:render>
 
   <div class="row-fluid" data-bind="visible: collections().length == 0 && !isLoading()">
-    <div class="span10 offset1 center">
+    <div class="span10 offset1 center importBtn" style="cursor: pointer">
       <i class="icon-plus-sign waiting"></i>
-      <h1 class="emptyMessage">${ _('There are currently no collections defined.') }<br/>${ _('Click on Import to add one or more.') }</h1>
+      <h1 class="emptyMessage">${ _('There are currently no collections defined.') }<br/><a href="javascript:void(0)" class="importBtn">${ _('Click here to add') }</a> ${ _('one or more.') }</h1>
     </div>
   </div>
   <div class="row-fluid" data-bind="visible: isLoading()">
@@ -59,13 +59,15 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
   </div>
   <div class="row-fluid">
     <div class="span12">
+      <p>
       <ul id="collections" data-bind="template: {name: 'collectionTemplate', foreach: filteredCollections}">
       </ul>
+      </p>
     </div>
   </div>
 
   <script id="collectionTemplate" type="text/html">
-    <li style="cursor: pointer" data-bind="click: $root.editCollection" title="${ _('Click to edit') }">
+    <li class="collectionRow" data-bind="click: $root.editCollection" title="${ _('Click to edit') }">
       <div class="pull-right" style="margin-top: 10px;margin-right: 10px; cursor: pointer">
         <a data-bind="click: $root.copyCollection, clickBubble: false"><i class="icon-copy"></i> ${_('Copy')}</a> &nbsp;
         <a data-bind="click: $root.markForDeletion, clickBubble: false"><i class="icon-remove"></i> ${_('Delete')}</a>
@@ -73,6 +75,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
       <h4><i class="icon-list"></i> <span data-bind="text: label"></span></h4>
     </li>
   </script>
+  </div>
 
 </div>
 
@@ -131,13 +134,6 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
     width: 100%;
   }
 
-  #collections li {
-    margin-bottom: 10px;
-    padding: 10px;
-    border: 1px solid #E3E3E3;
-    height: 40px;
-  }
-
   .placeholder {
     height: 40px;
     background-color: #F5F5F5;
@@ -195,7 +191,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
         showImportModal();
     % endif
 
-    $("#importBtn").on("click", function () {
+    $(".importBtn").on("click", function () {
       showImportModal();
     });
 

+ 2 - 2
apps/search/src/search/templates/layout.mako

@@ -22,7 +22,7 @@
 
 <%def name="skeleton()">
   <link rel="stylesheet" href="/search/static/css/admin.css">
-  <link rel="stylesheet" href="/search/static/chosen/chosen.css">
+  <link rel="stylesheet" href="/search/static/chosen/chosen.min.css">
   <script src="/search/static/chosen/chosen.jquery.min.js" type="text/javascript" charset="utf-8"></script>
   <script src="/static/ext/js/knockout-min.js" type="text/javascript" charset="utf-8"></script>
 
@@ -73,7 +73,7 @@
 </%def>
 
 <%def name="sidebar(hue_collection, section='')">
-  <div class="well sidebar-nav" style="min-height: 250px">
+  <div class="sidebar-nav" style="min-height: 250px">
     <ul class="nav nav-list">
 
     <li class="nav-header">${_('Collection')}</li>

+ 3 - 2
apps/search/src/search/templates/search.mako

@@ -50,7 +50,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
   % endif
   <form class="form-search" style="margin: 0">
     <div class="dropdown" style="display: inline">
-      Search in <a href="#" data-toggle="dropdown"><strong class="current-collection"></strong> <i class="icon-caret-down"></i></a>
+      ${ _('Search in')} <a href="#" data-toggle="dropdown"><strong class="current-collection"></strong> <i class="icon-caret-down"></i></a>
       <ul class="dropdown-menu">
         % if user.is_superuser:
           % for collection in hue_collections:
@@ -69,7 +69,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
     </div>
   </form>
 </div>
-
+<div class="well">
 <div class="container results">
   <div id="loader" class="row" style="text-align: center">
     <img src="/static/art/spinner.gif" />
@@ -208,6 +208,7 @@ ${ commonheader(_('Search'), "search", user, "40px") | n,unicode }
   </div>
   % endif
 </div>
+</div>
 
 % if hue_collection:
   ${ hue_collection.result.get_extracode() | n,unicode }

BIN
apps/search/static/chosen/chosen-sprite.png


BIN
apps/search/static/chosen/chosen-sprite@2x.png


+ 0 - 418
apps/search/static/chosen/chosen.css

@@ -1,418 +0,0 @@
-/*
-*
-* Chosen for Bootstrap and Less
-*
-* Converted by @whitetruffle (http://www.twitter.com/whitetruffle)
-* from @joeylomanto's SASS fork (http://chosen-sass-bootstrap.herokuapp.com/)
-* Havest: @harvest
-*
-*/
-
-.chzn-container {
-  position: relative;
-  display: inline-block;
-  zoom: 1;
-  *display: inline;
-}
-.chzn-container .chzn-drop {
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-  -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
-  -moz-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
-  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
-  background: #fff;
-  border: 1px solid #CCC;
-  position: absolute;
-  top: 29px;
-  left: 0;
-  z-index: 1010;
-  margin: 4px 0 0;
-}
-.chzn-container-single .chzn-single {
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  border-radius: 3px;
-  -webkit-box-shadow: 0 0 3px #ffffff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
-  -moz-box-shadow: 0 0 3px #ffffff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
-  box-shadow: 0 0 3px #ffffff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
-  -webkit-background-clip: padding-box;
-  -moz-background-clip: padding-box;
-  background-clip: padding-box;
-  background-color: #f6f6f6;
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(50%, #f6f6f6), to(#f4f4f4));
-  background-image: -webkit-linear-gradient(#ffffff, #f6f6f6 50%, #f4f4f4);
-  background-image: -moz-linear-gradient(top, #ffffff, #f6f6f6 50%, #f4f4f4);
-  background-image: -o-linear-gradient(#ffffff, #f6f6f6 50%, #f4f4f4);
-  background-image: linear-gradient(#ffffff, #f6f6f6 50%, #f4f4f4);
-  background-repeat: no-repeat;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff4f4f4', GradientType=0);
-  -moz-background-clip: padding;
-  background-color: #ffffff;
-  border: 1px solid #CCC;
-  display: block;
-  overflow: hidden;
-  white-space: nowrap;
-  position: relative;
-  height: 28px;
-  line-height: 29px;
-  padding: 0 0 0 8px;
-  color: #555555;
-  text-decoration: none;
-}
-.chzn-container-single .chzn-single span {
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-  margin-right: 26px;
-  display: block;
-  overflow: hidden;
-  white-space: nowrap;
-}
-.chzn-container-single .chzn-single abbr {
-  display: block;
-  position: absolute;
-  right: 26px;
-  top: 8px;
-  width: 12px;
-  height: 13px;
-  font-size: 1px;
-  background: url("chosen-sprite.png") right top no-repeat;
-}
-.chzn-container-single .chzn-single abbr:hover {
-  background-position: right -11px;
-}
-.chzn-container-single .chzn-single div {
-  position: absolute;
-  right: 0;
-  top: 0;
-  display: block;
-  height: 100%;
-  width: 18px;
-}
-.chzn-container-single .chzn-single div b {
-  background: url("chosen-sprite.png") no-repeat 0 2px;
-  display: block;
-  width: 100%;
-  height: 100%;
-}
-.chzn-container-single .chzn-search {
-  padding: 3px 4px;
-  position: relative;
-  margin: 0;
-  white-space: nowrap;
-  z-index: 1010;
-}
-.chzn-container-single .chzn-search input {
-  margin: 1px 0;
-  padding: 4px 20px 4px 5px;
-  outline: 0;
-}
-.chzn-container-single .chzn-default {
-  color: #999;
-}
-.chzn-container-single .chzn-drop {
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  border-radius: 3px;
-  -webkit-background-clip: padding-box;
-  -moz-background-clip: padding-box;
-  background-clip: padding-box;
-  -moz-background-clip: padding;
-}
-.chzn-container-single.chzn-disabled .chzn-single abbr:hover {
-  background-position: right top;
-}
-.chzn-container-single-nosearch .chzn-search input {
-  position: absolute;
-  left: -9000px;
-}
-.chzn-container-multi .chzn-choices {
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  border-radius: 3px;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  -webkit-transition: border linear 0.2s;
-  -moz-transition: border linear 0.2s;
-  -o-transition: border linear 0.2s;
-  transition: border linear 0.2s;
-  -webkit-transition: box-shadow linear 0.2s;
-  -moz-transition: box-shadow linear 0.2s;
-  -o-transition: box-shadow linear 0.2s;
-  transition: box-shadow linear 0.2s;
-  background-color: #ffffff !important;
-  border: 1px solid #cccccc;
-  cursor: text;
-  overflow: hidden;
-  height: auto !important;
-  height: 1%;
-  position: relative;
-  display: block;
-  padding: 0;
-  margin: 0;
-  font-size: 14px;
-  line-height: 20px;
-  color: #555555;
-}
-.chzn-container-multi .chzn-choices li {
-  float: left;
-  list-style: none;
-}
-.chzn-container-multi .chzn-choices .search-field {
-  white-space: nowrap;
-  margin: 0;
-  padding: 0;
-}
-.chzn-container-multi .chzn-choices .search-field input {
-  -webkit-box-shadow: none;
-  -moz-box-shadow: none;
-  box-shadow: none;
-  color: #555555;
-  background: transparent !important;
-  border: 0 !important;
-  font-family: sans-serif;
-  font-size: 100%;
-  height: 15px;
-  padding: 5px;
-  margin: 1px 0 2px;
-  outline: 0;
-}
-.chzn-container-multi .chzn-choices .search-field .default {
-  color: #999;
-}
-.chzn-container-multi .chzn-choices .search-choice {
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  border-radius: 3px;
-  -webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
-  -moz-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
-  box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
-  background-color: #f6f6f6;
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(50%, #f6f6f6), to(#f4f4f4));
-  background-image: -webkit-linear-gradient(#ffffff, #f6f6f6 50%, #f4f4f4);
-  background-image: -moz-linear-gradient(top, #ffffff, #f6f6f6 50%, #f4f4f4);
-  background-image: -o-linear-gradient(#ffffff, #f6f6f6 50%, #f4f4f4);
-  background-image: linear-gradient(#ffffff, #f6f6f6 50%, #f4f4f4);
-  background-repeat: no-repeat;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff4f4f4', GradientType=0);
-  -webkit-background-clip: padding-box;
-  -moz-background-clip: padding-box;
-  background-clip: padding-box;
-  -moz-background-clip: padding;
-  color: #555555;
-  border: 1px solid #999999;
-  line-height: 13px;
-  padding: 3px 20px 3px 5px;
-  margin: 3px 0 3px 5px;
-  position: relative;
-  cursor: default;
-}
-.chzn-container-multi .chzn-choices .search-choice .search-choice-close {
-  display: block;
-  position: absolute;
-  right: 3px;
-  top: 4px;
-  width: 12px;
-  height: 13px;
-  font-size: 1px;
-  background: url("chosen-sprite.png") right top no-repeat;
-}
-.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
-  background-position: right -11px;
-}
-.chzn-container-multi .chzn-choices .search-choice.search-choice-disabled {
-  background-color: #eeeeee;
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f4f4f4), color-stop(50%, #f0f0f0), to(#e8e8e8));
-  background-image: -webkit-linear-gradient(#f4f4f4, #f0f0f0 50%, #e8e8e8);
-  background-image: -moz-linear-gradient(top, #f4f4f4, #f0f0f0 50%, #e8e8e8);
-  background-image: -o-linear-gradient(#f4f4f4, #f0f0f0 50%, #e8e8e8);
-  background-image: linear-gradient(#f4f4f4, #f0f0f0 50%, #e8e8e8);
-  background-repeat: no-repeat;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff4f4f4', endColorstr='#ffe8e8e8', GradientType=0);
-  color: #666;
-  border: 1px solid #cccccc;
-  padding-right: 5px;
-}
-.chzn-container-multi .chzn-choices .search-choice-focus {
-  background: #d4d4d4;
-}
-.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close {
-  background-position: right -11px;
-}
-.chzn-container .chzn-results {
-  margin: 0 4px 4px 0;
-  max-height: 240px;
-  padding: 0 0 0 4px;
-  position: relative;
-  overflow-x: hidden;
-  overflow-y: auto;
-  -webkit-overflow-scrolling: touch;
-}
-.chzn-container .chzn-results li {
-  display: none;
-  line-height: 15px;
-  padding: 5px 6px;
-  margin: 0;
-  list-style: none;
-}
-.chzn-container .chzn-results li em {
-  background: #feffde;
-  font-style: normal;
-}
-.chzn-container .chzn-results .no-results {
-  background: #f4f4f4;
-  display: list-item;
-}
-.chzn-container .chzn-results .group-result {
-  cursor: default;
-  color: #999;
-  font-weight: bold;
-}
-.chzn-container .chzn-results .group-option {
-  padding-left: 15px;
-}
-.chzn-container .chzn-results .active-result {
-  cursor: pointer;
-  display: list-item;
-}
-.chzn-container .chzn-results .highlighted {
-  background-color: #326dcc;
-  background-image: -moz-linear-gradient(top, #3875d7, #2a62bc);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#3875d7), to(#2a62bc));
-  background-image: -webkit-linear-gradient(top, #3875d7, #2a62bc);
-  background-image: -o-linear-gradient(top, #3875d7, #2a62bc);
-  background-image: linear-gradient(to bottom, #3875d7, #2a62bc);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3875d7', endColorstr='#ff2a62bc', GradientType=0);
-  color: #fff;
-}
-.chzn-container .chzn-results .highlighted em {
-  background: transparent;
-}
-.chzn-container .chzn-results-scroll {
-  background: white;
-  margin: 0 4px;
-  position: absolute;
-  text-align: center;
-  width: 321px;
-  /* This should by dynamic with js */
-
-  z-index: 1;
-}
-.chzn-container .chzn-results-scroll span {
-  display: inline-block;
-  height: 17px;
-  text-indent: -5000px;
-  width: 9px;
-}
-.chzn-container .chzn-results-scroll-down {
-  bottom: 0;
-}
-.chzn-container .chzn-results-scroll-down span {
-  background: url("chosen-sprite.png") no-repeat -4px -3px;
-}
-.chzn-container .chzn-results-scroll-up span {
-  background: url("chosen-sprite.png") no-repeat -22px -3px;
-}
-.chzn-container-multi .chzn-results {
-  margin: 4px;
-  padding: 0;
-}
-.chzn-container-multi .chzn-drop .result-selected {
-  display: none;
-}
-.chzn-container-active .chzn-single {
-  border: 1px solid #CCC;
-}
-.chzn-container-active .chzn-single .chzn-drop {
-  margin-top: -29px;
-}
-.chzn-container-active .chzn-single-with-drop {
-  -webkit-box-shadow: none;
-  -moz-box-shadow: none;
-  box-shadow: none;
-  border-color: #CCC;
-}
-.chzn-container-active .chzn-single-with-drop div {
-  background: transparent;
-  border-left: none;
-}
-.chzn-container-active .chzn-single-with-drop div b {
-  background-position: -18px 1px;
-}
-.chzn-container-active .chzn-choices {
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
-  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
-  border: 1px solid rgba(82, 168, 236, 0.8);
-  outline: 0;
-  outline: thin dotted \9;
-  /* IE6-9 */
-
-}
-.chzn-container-active .chzn-choices .search-field input {
-  color: #111 !important;
-}
-.chzn-disabled {
-  opacity: 0.005;
-  filter: alpha(opacity=0.5);
-  cursor: default;
-}
-.chzn-disabled .chzn-single {
-  cursor: default;
-}
-.chzn-disabled .search-choice-close {
-  cursor: default;
-}
-.chzn-rtl {
-  text-align: right;
-}
-.chzn-rtl .chzn-single {
-  padding: 0 8px 0 0;
-  overflow: visible;
-}
-.chzn-rtl .chzn-single span {
-  margin-left: 26px;
-  margin-right: 0;
-  direction: rtl;
-}
-.chzn-rtl .chzn-single div {
-  left: 3px;
-  right: auto;
-}
-.chzn-rtl .chzn-single abbr {
-  left: 26px;
-  right: auto;
-}
-.chzn-rtl .chzn-choices li {
-  float: right;
-}
-.chzn-rtl .chzn-choices .search-field input {
-  direction: rtl;
-}
-.chzn-rtl .chzn-choices .search-choice {
-  padding: 3px 5px 3px 19px;
-  margin: 3px 5px 3px 0;
-}
-.chzn-rtl .chzn-choices .search-choice .search-choice-close {
-  left: 4px;
-  right: auto;
-  background-position: right top;
-}
-.chzn-rtl .chzn-results .group-option {
-  padding-left: 0;
-  padding-right: 15px;
-}
-.chzn-rtl .chzn-search input {
-  padding: 4px 5px 4px 20px;
-  direction: rtl;
-}
-.chzn-rtl.chzn-container-single .chzn-results {
-  margin: 0 0 4px 4px;
-  padding: 0 4px 0 0;
-}
-.chzn-rtl.chzn-container-active .chzn-single-with-drop div {
-  border-right: none;
-}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 9
apps/search/static/chosen/chosen.jquery.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 2 - 0
apps/search/static/chosen/chosen.min.css


+ 13 - 1
apps/search/static/css/admin.css

@@ -46,7 +46,7 @@ h3 {
 }
 
 .form-actions {
-  padding-left: 20px!important;
+  padding-left: 0px!important;
 }
 
 .bubble {
@@ -90,6 +90,7 @@ h3 {
   padding-left: 20px;
   padding-right: 20px;
   text-align: left;
+  margin-top: 10px;
 }
 
 .search-bar h4 {
@@ -114,3 +115,14 @@ h1.emptyMessage {
 .editable {
   cursor: pointer;
 }
+
+.collectionRow {
+  cursor: pointer;
+  margin-bottom: 10px;
+  padding: 10px;
+  height: 40px;
+}
+
+.collectionRow:hover {
+  background-color: #EFEFEF;
+}

+ 1 - 1
apps/search/static/css/search.css

@@ -18,11 +18,11 @@
   -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
   box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
   margin: 0;
-  margin-bottom: 20px;
   padding: 10px;
   padding-left: 20px;
   padding-right: 20px;
   text-align: left;
+  margin-top: 10px;
 }
 
 .search-bar input {

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác