Преглед изворни кода

[search] Fix row height problem

Enrico Berti пре 11 година
родитељ
комит
fbde02532e
2 измењених фајлова са 2 додато и 25 уклоњено
  1. 1 1
      apps/search/src/search/templates/search2.mako
  2. 1 24
      apps/search/static/js/charts.ko.js

+ 1 - 1
apps/search/src/search/templates/search2.mako

@@ -247,7 +247,7 @@ ${ commonheader(_('Search'), "search", user, "80px") | n,unicode }
         <a href="javascript:void(0)" data-bind="visible: $parent.rows().length > 1, click: function(){remove($parent, this)}"><i class="fa fa-times"></i></a>
         <a href="javascript:void(0)" data-bind="visible: $parent.rows().length > 1, click: function(){remove($parent, this)}"><i class="fa fa-times"></i></a>
       </div>
       </div>
     </div>
     </div>
-    <div style="min-height:0px" data-bind="css: {'row-fluid': true, 'row-container':true, 'is-editing': $root.isEditing}, 
+    <div data-bind="css: {'row-fluid': true, 'row-container':true, 'is-editing': $root.isEditing},
         sortable: { template: 'widget-template', data: widgets, isEnabled: $root.isEditing, 
         sortable: { template: 'widget-template', data: widgets, isEnabled: $root.isEditing, 
         options: {'handle': '.move-widget', 'opacity': 0.7, 'placeholder': 'row-highlight', 'greedy': true, 
         options: {'handle': '.move-widget', 'opacity': 0.7, 'placeholder': 'row-highlight', 'greedy': true, 
             'stop': function(event, ui){$('.card-body').slideDown('fast', function(){$(window).scrollTop(lastWindowScrollPosition)});}, 
             'stop': function(event, ui){$('.card-body').slideDown('fast', function(){$(window).scrollTop(lastWindowScrollPosition)});}, 

+ 1 - 24
apps/search/static/js/charts.ko.js

@@ -68,40 +68,24 @@ ko.bindingHandlers.pieChart = {
             _options.onClick(d);
             _options.onClick(d);
           });
           });
       });
       });
-    },
-    update: function (element, valueAccessor) {
-      var value = valueAccessor();
-      // do something with the updated value
     }
     }
   };
   };
 
 
 ko.bindingHandlers.barChart = {
 ko.bindingHandlers.barChart = {
   init: function (element, valueAccessor) {
   init: function (element, valueAccessor) {
     barChart(element, valueAccessor(), false);
     barChart(element, valueAccessor(), false);
-  },
-  update: function (element, valueAccessor) {
-    var value = valueAccessor();
-    // do something with the updated value
   }
   }
 };
 };
 
 
 ko.bindingHandlers.timelineChart = {
 ko.bindingHandlers.timelineChart = {
   init: function (element, valueAccessor) {
   init: function (element, valueAccessor) {
     barChart(element, valueAccessor(), true);
     barChart(element, valueAccessor(), true);
-  },
-  update: function (element, valueAccessor) {
-    var value = valueAccessor();
-    // do something with the updated value
   }
   }
 };
 };
 
 
 ko.bindingHandlers.lineChart = {
 ko.bindingHandlers.lineChart = {
   init: function (element, valueAccessor) {
   init: function (element, valueAccessor) {
     lineChart(element, valueAccessor());
     lineChart(element, valueAccessor());
-  },
-  update: function (element, valueAccessor) {
-    var value = valueAccessor();
-    // do something with the updated value
   }
   }
 };
 };
 
 
@@ -115,14 +99,7 @@ ko.bindingHandlers.mapChart = {
     $(element).css("position", "relative");
     $(element).css("position", "relative");
     $(element).css("marginLeft", "auto");
     $(element).css("marginLeft", "auto");
     $(element).css("marginRight", "auto");
     $(element).css("marginRight", "auto");
-//
-//    if (typeof _options.maxWidth != "undefined") {
-//      var _max = _options.maxWidth * 1;
-//      if ($(element).width() > _max) {
-//        $(element).width(_max);
-//      }
-//    }
-//
+
     if (typeof _options.maxWidth != "undefined"){
     if (typeof _options.maxWidth != "undefined"){
         var _max = _options.maxWidth*1;
         var _max = _options.maxWidth*1;
         $(element).width(Math.min($(element).parent().width(), _max));
         $(element).width(Math.min($(element).parent().width(), _max));