column-break-before seems to be ignore, thus the multicolumn layout feelw odd.
---
 src/app/stylesheets/aggregator.scss             |   57 +++++++++++++++-
 src/app/views/templates/_basics.haml            |   37 ++++++-----
 src/app/views/templates/_content_selection.haml |   84 ++++++++++++-----------
 src/app/views/templates/_managed_content.haml   |    8 +-
 src/app/views/templates/index.haml              |    1 -
 src/app/views/templates/new.haml                |   55 ++++++++-------
 6 files changed, 152 insertions(+), 90 deletions(-)

diff --git a/src/app/stylesheets/aggregator.scss 
b/src/app/stylesheets/aggregator.scss
index 88612be..e25ba19 100644
--- a/src/app/stylesheets/aggregator.scss
+++ b/src/app/stylesheets/aggregator.scss
@@ -66,7 +66,9 @@ input.grid_3 { width: 150px !important; }
   .grid_3 input[type="search"] { width: 118px; }
 input.grid_4 { width: 210px !important; }
 input.grid_5 { width: 270px !important; }
-
+input.grid_6 { width: 330px !important; }
+input.grid_7 { width: 390px !important; }
+input.grid_8 { width: 450px !important; }
 
 /* BUTTONS */
 input[type='submit'],button,.button {
@@ -1006,6 +1008,59 @@ a.iconbutton {
   }
 }
 
+/* TEMPLATES */
+
+#build {
+  #add_software_button {
+    margin-top: 2em;
+    font-size: 140%;
+  }
+
+  #package_selection_list {
+    display: block;
+    overflow: auto;
+    margin-top: 2em;
+    &.loading {
+      height: 50px;
+      background-color: green;
+    }
+    &>.grid_16 {
+      margin: 0;
+    }
+  }
+
+  .packagename {
+    opacity: 1;
+    color: #000;
+  }
+}
+
+.softwaregroups {
+  height: 600px;
+  overflow: auto;
+  display: block;
+  @include column-count(4);
+  &>li {
+    display: block;
+    text-transform: uppercase;
+    margin: 0 0 .5em 0; padding: 0;
+    -moz-column-break-before: always;
+    column-break-before : always;
+  }
+  .packages {
+    display: block;
+    margin: 1em 0 0 0;
+    li {
+      text-transform: none;
+      display: block;
+      label {
+        font-weight: normal;
+      }
+    }
+  }
+}
+
+
 /* IE and other horror browser workarounds */
 
 /* basic image styling for buttons in older browsers */
diff --git a/src/app/views/templates/_basics.haml 
b/src/app/views/templates/_basics.haml
index e536328..a26af1b 100644
--- a/src/app/views/templates/_basics.haml
+++ b/src/app/views/templates/_basics.haml
@@ -1,27 +1,30 @@
 %h3 General Information
-%fieldset
-  = text_field :tpl, :name, :value => @tpl.name || 'Template Name', :class => 
"grid_3 alpha"
-  = text_field :tpl, :summary, :value => @tpl.summary || 'Template 
Description', :class => "grid_3"
+%fieldset.clearfix
+  %label.grid_4.alpha.la Template Name:
+  %label.grid_7.la Summary:
+  %label.grid_3.suffix_2.omega.la Version:
+  = text_field :tpl, :name, :value => @tpl.name || 'Template Name', :class => 
"grid_4 alpha"
+  = text_field :tpl, :summary, :value => @tpl.summary || 'Template 
Description', :class => "grid_7"
   = text_field_tag 'current_version', 'Current Version', :disabled => true, 
:class => "grid_3"
   %button{:type => 'button', :disabled => 'disabled', :class => "grid_2 
omega"} New Version
-%fieldset
-  = text_field_tag 'logo', 'Choose Logo', :disabled => true, :class => "grid_3 
alpha"
-  %button{:type => 'button', :disabled => 'disabled', :class => "grid_2"} 
Choose File
-%fieldset.clear
-  = label :tpl, :platform, 'Platform Choice:', :class => "grid_3 alpha"
-  = select :tpl, :platform, @tpl.xml.platforms.map {|id, p| [p['name'], id]}, 
{}, {:class => 'grid_3'}
+%fieldset.clearfix
+  %label.grid_4.alpha Choose Logo:
+  %input{:type => 'file', :disabled => 'disabled', :class => "grid_7"}
+%fieldset.clearfix
+  = label :tpl, :platform, 'Platform Choice:', :class => "grid_4 alpha"
+  = select :tpl, :platform, @tpl.xml.platforms.map {|id, p| [p['name'], id]}, 
{}, {:class => 'grid_7'}
   / FIXME: it's currently possible to choose bad os<->version combination, for 
example
   / RHEL 11, JS will be required to fix this
-  = select :tpl, :platform_version, @tpl.xml.platforms.map {|id, p| 
p['version'].to_s}.sort.uniq, {}, {:class => 'grid_2'}
-  = select :tpl, :architecture, @tpl.xml.platforms.map {|id, p| 
p['architecture']}.sort.uniq, {}, {:class => 'grid_3 omega'}
-%fieldset
-  = label_tag :bootable, 'Bootable:', :class => "grid_3 alpha"
-  .grid_8.omega
+  = select :tpl, :platform_version, @tpl.xml.platforms.map {|id, p| 
p['version'].to_s}.sort.uniq, {}, {:class => 'grid_3'}
+  = select :tpl, :architecture, @tpl.xml.platforms.map {|id, p| 
p['architecture']}.sort.uniq, {}, {:class => 'grid_2 omega'}
+%fieldset.clearfix
+  = label_tag :bootable, 'Bootable:', :class => "grid_4 alpha"
+  .grid_12.omega
     = radio_button_tag :bootable, 'yes', true, :disabled => true
     = label_tag :bootable, 'Yes'
     = radio_button_tag :bootable, 'no', false, :disabled => true
     = label_tag :bootable, 'No'
-%fieldset
-  %label{:for => :template_group, :class => 'grid_3 alpha'}
+%fieldset.clearfix
+  %label{:for => :template_group, :class => 'grid_4 alpha'}
     Template Group:
-  = select_tag(:template_group, options_for_select([['User Private', 1]]), 
:class => 'grid_3')
+  = select_tag(:template_group, options_for_select([['User Private', 1]]), 
:class => 'grid_4')
diff --git a/src/app/views/templates/_content_selection.haml 
b/src/app/views/templates/_content_selection.haml
index f080f4a..d77770a 100644
--- a/src/app/views/templates/_content_selection.haml
+++ b/src/app/views/templates/_content_selection.haml
@@ -1,42 +1,46 @@
-%h3 Managed Content Selection
-%h5 Search for Content
+.grid_16
+  %h3 Managed Content Selection
 
-- form_tag :action => "add_software" do
-  = text_field_tag 'search', 'Search Text', :disabled => true
-  = hidden_field_tag :template_id, @tpl.id
-  %a Advanced Search
+  - form_tag :action => "add_software" do
+    %fieldset.clearfix
+      .search.grid_4.alpha
+        %input{:type => "search", :placeholder => "Search for package", 
:disabled => "disabled"}
+        %button.action
+      = hidden_field_tag :template_id, @tpl.id
+      .grid_8
+        %p
+          Repositories to Search:
+          %a (Check all)
+        %fieldset
+          - @repository_manager.repositories.each do |repo|
+            = check_box_tag 'repositories[]', repo.id, true
+            = label_tag 'repositories[]', repo.name
+      %a.grid_4.omega Advanced Search
+    -#%fieldset.clearfix
+    -#  .grid_3.alpha
+    -#    = radio_button_tag :show_mode, 'group', true
+    -#    = label_tag :show_mode, 'Show by Group'
+    -#  .grid_2.omega
+    -#    = radio_button_tag :show_mode, 'type', false, :disabled => true
+    -#    = label_tag :show_mode, 'Show by Type'
 
-  %p
-    Repositories to Search:
-    %a (Check all)
-  %fieldset
-    - @repository_manager.repositories.each do |repo|
-      = check_box_tag 'repositories[]', repo.id, true
-      = label_tag 'repositories[]', repo.name
-  %fieldset
-    .grid_3.alpha
-      = radio_button_tag :show_mode, 'group', true
-      = label_tag :show_mode, 'Show by Group'
-    .grid_2.omega
-      = radio_button_tag :show_mode, 'type', false, :disabled => true
-      = label_tag :show_mode, 'Show by Type'
-
-  = submit_tag "Add Selected", :name => "add_selected", :class => 
"dialogbutton"
-  = submit_tag "Cancel", :name => "cancel", :class => "dialogbutton"
-  %ul.sidebarcontainer
-    - @groups.keys.sort.each do |group|
-      - group_sel = @groups[group][:selected]
-      - group_id = group.gsub(/\s/, '_')
-      %li
-        = check_box_tag 'groups[]', group, group_sel, :disabled => group_sel, 
:id => "group_#{group_id}"
-        = label_tag "group_#{group_id}", group
-        %ul
-          - @groups[group][:packages].each do |pkg, info|
-            - pkg_sel = info[:selected] ? true : false
-            - pkg_id = pkg.gsub(/\s/, '_')
-            %li
-              = check_box_tag 'packages[]', pkg, pkg_sel, :disabled => 
pkg_sel, :id => "package_#{pkg_id}"
-              = label_tag "package_#{pkg_id}", pkg
-
-  = submit_tag "Add Selected", :name => "add_selected", :class => 
"dialogbutton"
-  = submit_tag "Cancel", :name => "cancel", :class => "dialogbutton"
+    %fieldset.clearfix
+      = submit_tag "Add Selected", :name => "add_selected", :class => "grid_2 
alpha", :id => "do_add_software"
+      = submit_tag "Cancel", :name => "cancel", :class => "grid_2", :id => 
"cancel_add_software"
+    %ul.softwaregroups
+      - @groups.keys.sort.each do |group|
+        - group_sel = @groups[group][:selected]
+        - group_id = group.gsub(/\s/, '_')
+        %li
+          = check_box_tag 'groups[]', group, group_sel, :disabled => 
group_sel, :id => "group_#{group_id}"
+          = label_tag "group_#{group_id}", group
+          %ul.packages
+            - @groups[group][:packages].each do |pkg, info|
+              - pkg_sel = info[:selected] ? true : false
+              - pkg_id = pkg.gsub(/\s/, '_')
+              %li
+                = check_box_tag 'packages[]', pkg, pkg_sel, :disabled => 
pkg_sel, :id => "package_#{pkg_id}"
+                = label_tag "package_#{pkg_id}", pkg
+    %fieldset.clearfix
+      = submit_tag "Add Selected", :name => "add_selected", :class => "grid_2 
alpha", :id => "do_add_software"
+      = submit_tag "Cancel", :name => "cancel", :class => "grid_2", :id => 
"cancel_add_software"
diff --git a/src/app/views/templates/_managed_content.haml 
b/src/app/views/templates/_managed_content.haml
index 1597ee0..f6c8f7b 100644
--- a/src/app/views/templates/_managed_content.haml
+++ b/src/app/views/templates/_managed_content.haml
@@ -7,18 +7,18 @@
   = hidden_field :tpl, :id
   %h3.gap Managed Content to Bundle
   %hr
-  %label.header.alpha.prefix_2.grid_2 Name:
+  %label.header.alpha.prefix_2.grid_7 Name:
   %label.header.omega.grid_2.suffix_5 Repository:
   %label.grid_2.alpha.clear Managed:
-  .grid_9.omega
+  .grid_14.omega
     - if @tpl.xml.packages.empty?
       No selected packages
     - else
       - repos = @repository_manager.repositories_hash
       - @tpl.xml.packages.each do |pkg|
         - pkg_group = @groups.keys.find {|g| @groups[g][:packages][pkg[:name]]}
-        %fieldset
-          = text_field_tag 'packages[]', pkg[:name], :disabled => true, :id => 
"selected_package_#{pkg[:name]}", :class => "alpha grid_2"
+        %fieldset.clearfix
+          = text_field_tag 'packages[]', pkg[:name], :disabled => true, :id => 
"selected_package_#{pkg[:name]}", :class => "alpha grid_7 packagename"
           .grid_2= (pkg_group and repo = 
rep...@groups[pkg_group][:repository_id]]) ? repo.name.to_s : '&nbsp;'
           .grid_5.omega
             %button{:type => 'button', :disabled => 'disabled'} Config
diff --git a/src/app/views/templates/index.haml 
b/src/app/views/templates/index.haml
index 05621c7..c55f09a 100644
--- a/src/app/views/templates/index.haml
+++ b/src/app/views/templates/index.haml
@@ -47,7 +47,6 @@
     = render :partial => 'templates'
 
     %h3 Assembly
-    %table
     = render :partial => 'templates'
 
     %h3 Deployment Definitions
diff --git a/src/app/views/templates/new.haml b/src/app/views/templates/new.haml
index 8b38b1f..c592225 100644
--- a/src/app/views/templates/new.haml
+++ b/src/app/views/templates/new.haml
@@ -1,17 +1,16 @@
 :javascript
   $(document).ready(function() {
-    $(':submit[name=add_software_form]').click(function() {
-      $(this).css('display', 'none');
-      var div = $('#package_selection_list');
-      div.css('display', 'block');
-      div.addClass('loading');
-      // delete this styling when regular css #package_selection_list is done
-      div.css({'width': '600px', 'height': '300px', 'overflow': 'auto'});
+    var $container = $('#package_selection_list'),
+    $submit = $('#add_software_button');
+    $submit.click(function() {
       var list_url = '#{url_for :action => 'create', :ajax => true, 
:add_software_form => true}';
       var list_data = {'tpl[id]': $("input[name='tpl[id]']").val() || ''};
-      div.load(list_url, list_data, function() {
-        div.removeClass('loading');
-        $(':submit[name=add_selected]').click(function() {
+      $(this).hide();
+      $container.addClass('loading');
+      $container.load(list_url, list_data, function() {
+        $container.removeClass('loading')
+          .css({'display': 'block'});
+        $('#do_add_software').click(function() {
           var url = '#{url_for :action => 'add_software', :ajax => true, 
:add_selected => true}';
           var data = {
             'packages[]': $("input:checked[name='packages[]']").map(function() 
{return $(this).val()}).get(),
@@ -21,8 +20,8 @@
           $('#selected_packages').load(url, data, function() {});
           return false;
         });
-        $(':submit[name=cancel]').click(function() {
-          div.css('display', 'none');
+        $('#cancel_add_software').click(function() {
+          $container.hide();
           return false;
         });
       });
@@ -30,17 +29,17 @@
     });
   });
 
-%h2.grid_16 Template
-- form_for @tpl, :url => { :action => "create" } do
-  = error_messages_for 'tpl'
-  .grid_11
+.grid_16
+  %h2 Template
+  - form_for @tpl, :url => { :action => "create" } do
+    = error_messages_for 'tpl'
     = render :partial => 'basics'
 
     %h3.disabled.gap Local Content to Bundle
     %hr
-    %fieldset
+    %fieldset.clearfix
       = label_tag :local_bundle_name, 'Local:', :class => "disabled grid_2 
alpha"
-      = text_field_tag 'local_bundle_name[]', 'Bundle Name', :disabled => 
true, :class => "grid_3"
+      = text_field_tag 'local_bundle_name[]', 'Bundle Name', :disabled => 
true, :class => "grid_8"
       .grid_6.omega
         %button{:type => 'button', :disabled => 'disabled'} Browse
         %button{:type => 'button', :disabled => 'disabled'} Config
@@ -50,7 +49,7 @@
         )
       .grid_2.alpha
         &nbsp;
-      = text_field_tag 'local_bundle_name[]', 'Bundle Name', :disabled => 
true, :class => "grid_3"
+      = text_field_tag 'local_bundle_name[]', 'Bundle Name', :disabled => 
true, :class => "grid_8"
       .grid_6.omega
         %button{:type => 'button', :disabled => 'disabled'} Browse
         %button{:type => 'button', :disabled => 'disabled'} Config
@@ -60,21 +59,23 @@
         )
 
     = render :partial => 'managed_content'
-    = submit_tag "Add Software", :name => "add_software_form"
-    #package_selection_list{:style => 'display: none'}
+    .clearfix
+      .grid_14.alpha.prefix_2
+        = submit_tag "Add Software", :name => "add_software_form", :id => 
"add_software_button", :class => "iconbutton"
 
+    #package_selection_list{:style => 'display: none'}
     %h3.gap.clear Preboot Configuration
     %hr
-    %fieldset
-      .grid_4
+    %fieldset.clearfix
+      .grid_4.alpha
         = radio_button_tag :configure_via_script, 'no', :disabled => true
         = label_tag :configure_via_script, 'Configure Via Script'
-      = file_field_tag 'script_file', :disabled => true, :class => 'grid_5'
-    %fieldset.clear
-      .grid_4
+      = file_field_tag 'script_file', :disabled => true, :class => 'grid_12 
omega'
+    %fieldset.clearfix
+      .grid_4.alpha
         = radio_button_tag :configure_via_script, 'no', :disabled => true
         = label_tag :configure_via_script, 'Configure Via Script'
-      = file_field_tag 'script_file', :disabled => true, :class => 'grid_5'
+      = file_field_tag 'script_file', :disabled => true, :class => 'grid_12 
omega'
 
     = submit_tag "Save", :name => "save", :class => "dialogbutton"
     = submit_tag "Cancel", :name => "cancel", :class => "dialogbutton"
-- 
1.7.2.3

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to