Skip to content

Commit

Permalink
Merge pull request #1 from sukhbir-singh/fixes
Browse files Browse the repository at this point in the history
bug #2406 solved
  • Loading branch information
cpg authored Aug 16, 2019
2 parents 4440e2c + f991f5e commit a3fb165
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 7 deletions.
2 changes: 2 additions & 0 deletions app/assets/javascripts/webapps.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ $(document).ready ->

#new webapp
$(document).on "ajax:success", "#webapp-new", (event, results) ->
console.log(results)
if results.status is "ok"
$('#webapps-table').parent().html(results.content)


$(document).on "ajax:success", ".delete_webapp", (event, results) ->
console.log(results)
if results.status is "ok"
$('#webapps-table').parent().html(results.content)

Expand Down
24 changes: 24 additions & 0 deletions app/assets/stylesheets/webapp_style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,27 @@
display: inline-block;
text-indent: -9999px;
}


div.webapp table{
background: white;
}

div.webapp table:hover{
cursor: pointer;
}

.settings-stretcher{
background: white;
margin-bottom: 6px;
padding-top: 6px;
margin-top: 2px;
}

.webapp-table-row{
background: #fbfbfb !important;
}

.webapp-table-row:hover{
background: #dcdcdc !important;
}
4 changes: 2 additions & 2 deletions app/views/webapps/_form.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:ok_icon_path => theme_image_path('ok.png'), \
:error_icon_path => theme_image_path('stop.png') \
}, \
:class => 'webapp create-form form-horizontal', \
:class => 'webapp create-form form-horizontal p-1 mt-2 bg-white d-inline-block', \
:id => 'webapp-new' \
} do |f|

Expand All @@ -23,4 +23,4 @@
.controls.col-xs-offset-2.col-xs-10
= spinner
= button_tag t('create'), :type => 'submit', :id => 'webapp_create_button', :class => 'btnn btn btn-info'
= link_to t('cancel'), '#', :class => 'close-area cancel-link btn btn-primary left-margin-10', :data => {:related => '#new-webapp-to-step1'}
= link_to t('cancel'), '#', :class => 'close-area cancel-link cancel-btn-style btn-sm left-margin-10', :data => {:related => '#new-webapp-to-step1'}
2 changes: 1 addition & 1 deletion app/views/webapps/_list.html.slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.settings-table#webapps-table
- if @webapps.size > 0
table.settings.table
table.settings
thead
tr
th.settings-col1.webapps-col1 scope="col" = t 'name'
Expand Down
7 changes: 4 additions & 3 deletions app/views/webapps/_webapp.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
- webapp = webapp
- uid = webapp.id.to_s
- return if webapp.nil?

div.webapp[id="whole_webapp_#{uid}"]
table.settings.table.stretchtoggle.table-condensed id="webapp_row_#{uid}"
table.webapp-table-row.settings.stretchtoggle.table-condensed id="webapp_row_#{uid}"
tr
td.settings-col1.webapps-col1.settings-col1-pad
= link_to(webapp.name, '')
Expand All @@ -27,9 +28,9 @@ div.webapp[id="whole_webapp_#{uid}"]
:method => :delete,
:id => "delete-webapp-#{webapp.id}",
:data => { :confirm => "Are you sure you want to delete "+ webapp.name},
:class => 'btn btn-primary btn-sm btn-delete navbar-right delete_webapp remote-btn'
:class => 'btn-delete remote-btn navbar-right btn btn-sm d-inline-block'
.settings-fields
table.table.table-condensed
table.table-condensed
tr
td
= t 'name'
Expand Down
3 changes: 2 additions & 1 deletion app/views/webapps/index.html.slim
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
= stylesheet_link_tag 'webapp_style'
=render 'content'
= javascript_include_tag 'webapps'
= render 'content'
2 changes: 2 additions & 0 deletions app/views/webapps/permissions.html.slim
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
= stylesheet_link_tag 'webapp_style'
= javascript_include_tag 'webapps'

.settings-table#permissions
- if @webapps.size > 0
table.settings.table
Expand Down

0 comments on commit a3fb165

Please sign in to comment.