gluttonberg-core 2.6.3 → 2.6.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -334,8 +334,15 @@ var AssetBrowser = {
334
334
 
335
335
  $(window).resize(function(e) {
336
336
  $("#assetsDialog").css({
337
- position: "absolute",
338
- top: (($(window).scrollTop())) + "px"
337
+ height: ($(window).height()*0.9) + "px",
338
+ width: ($(window).width()*0.7) + "px",
339
+ "margin-top": "-" + (($(window).height()*0.9)/2) + "px",
340
+ "margin-left": "-" + (($(window).width()*0.7)/2) + "px"
341
+ })
342
+
343
+ $(".modal-body").css({
344
+ "max-height": (($(window).height()*0.9) - 135) + "px",
345
+ "height": (($(window).height()*0.9) - 135) + "px"
339
346
  })
340
347
 
341
348
  })
@@ -500,7 +507,7 @@ var AssetBrowser = {
500
507
 
501
508
  if(accordionContentInner.attr("content-loaded") == "false"){
502
509
  accordionContentInner.prepend("<img src='/assets/gb_spinner.gif' class='gb_spinner'/>");
503
- $.get("/admin/browser-collection/"+collectionID+".json", function(data){
510
+ $.get("/admin/browser-collection/"+collectionID+".json?filter="+AssetBrowser.filter.val(), function(data){
504
511
  $(".gb_spinner").remove();
505
512
  accordionContentInner.prepend(data['markup']);
506
513
  });
@@ -60,7 +60,13 @@ module Gluttonberg
60
60
 
61
61
  def browser_collection
62
62
  @collection = AssetCollection.find(params[:id])
63
- @assets = @collection.assets
63
+ @category_filter = ( params[:filter].blank? ? "all" : params[:filter] )
64
+ if @category_filter == "all"
65
+ @assets = @collection.assets
66
+ else
67
+ @category = AssetCategory.where({ :name => @category_filter }).first
68
+ @assets = @collection.assets.where({:asset_type_id => @category.asset_type_ids }) unless @category.blank? || @category.asset_type_ids.blank?
69
+ end
64
70
  render :layout => false
65
71
  end
66
72
 
@@ -1,3 +1,3 @@
1
1
  module Gluttonberg
2
- VERSION = "2.6.3"
2
+ VERSION = "2.6.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gluttonberg-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.3
4
+ version: 2.6.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-05-02 00:00:00.000000000 Z
15
+ date: 2013-05-03 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: authlogic