change styling towards design rj
This commit is contained in:
@@ -14,6 +14,7 @@ group :assets do
|
|||||||
gem 'sass-rails', '~> 3.2.3'
|
gem 'sass-rails', '~> 3.2.3'
|
||||||
gem 'coffee-rails', '~> 3.2.1'
|
gem 'coffee-rails', '~> 3.2.1'
|
||||||
gem 'twitter-bootstrap-rails'
|
gem 'twitter-bootstrap-rails'
|
||||||
|
gem 'compass-rails'
|
||||||
|
|
||||||
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
||||||
# gem 'therubyracer', :platforms => :ruby
|
# gem 'therubyracer', :platforms => :ruby
|
||||||
|
|||||||
+11
-2
@@ -60,6 +60,7 @@ GEM
|
|||||||
xpath (~> 0.1.4)
|
xpath (~> 0.1.4)
|
||||||
childprocess (0.3.5)
|
childprocess (0.3.5)
|
||||||
ffi (~> 1.0, >= 1.0.6)
|
ffi (~> 1.0, >= 1.0.6)
|
||||||
|
chunky_png (1.2.6)
|
||||||
coderay (1.0.7)
|
coderay (1.0.7)
|
||||||
coffee-rails (3.2.2)
|
coffee-rails (3.2.2)
|
||||||
coffee-script (>= 2.2.0)
|
coffee-script (>= 2.2.0)
|
||||||
@@ -69,6 +70,12 @@ GEM
|
|||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.3.3)
|
coffee-script-source (1.3.3)
|
||||||
commonjs (0.2.6)
|
commonjs (0.2.6)
|
||||||
|
compass (0.12.2)
|
||||||
|
chunky_png (~> 1.2)
|
||||||
|
fssm (>= 0.2.7)
|
||||||
|
sass (~> 3.1)
|
||||||
|
compass-rails (1.0.3)
|
||||||
|
compass (>= 0.12.2, < 0.14)
|
||||||
couchrest (1.1.3)
|
couchrest (1.1.3)
|
||||||
mime-types (~> 1.15)
|
mime-types (~> 1.15)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
@@ -92,6 +99,7 @@ GEM
|
|||||||
factory_girl (~> 4.0.0)
|
factory_girl (~> 4.0.0)
|
||||||
railties (>= 3.0.0)
|
railties (>= 3.0.0)
|
||||||
ffi (1.1.5)
|
ffi (1.1.5)
|
||||||
|
fssm (0.2.9)
|
||||||
haml (3.1.7)
|
haml (3.1.7)
|
||||||
haml-rails (0.3.4)
|
haml-rails (0.3.4)
|
||||||
actionpack (~> 3.0)
|
actionpack (~> 3.0)
|
||||||
@@ -99,7 +107,7 @@ GEM
|
|||||||
haml (~> 3.0)
|
haml (~> 3.0)
|
||||||
railties (~> 3.0)
|
railties (~> 3.0)
|
||||||
hike (1.2.1)
|
hike (1.2.1)
|
||||||
i18n (0.6.0)
|
i18n (0.6.1)
|
||||||
journey (1.0.4)
|
journey (1.0.4)
|
||||||
jquery-rails (2.1.1)
|
jquery-rails (2.1.1)
|
||||||
railties (>= 3.1.0, < 5.0)
|
railties (>= 3.1.0, < 5.0)
|
||||||
@@ -196,7 +204,7 @@ GEM
|
|||||||
activesupport (~> 3.0)
|
activesupport (~> 3.0)
|
||||||
railties (~> 3.0)
|
railties (~> 3.0)
|
||||||
slim (~> 1.0)
|
slim (~> 1.0)
|
||||||
slop (3.3.2)
|
slop (3.3.3)
|
||||||
sprockets (2.1.3)
|
sprockets (2.1.3)
|
||||||
hike (~> 1.2)
|
hike (~> 1.2)
|
||||||
rack (~> 1.0)
|
rack (~> 1.0)
|
||||||
@@ -236,6 +244,7 @@ PLATFORMS
|
|||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
capybara
|
capybara
|
||||||
coffee-rails (~> 3.2.1)
|
coffee-rails (~> 3.2.1)
|
||||||
|
compass-rails
|
||||||
couch_potato!
|
couch_potato!
|
||||||
devise (= 2.0.4)
|
devise (= 2.0.4)
|
||||||
devise_simply_stored
|
devise_simply_stored
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 47 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -5,7 +5,16 @@ root.Qsupplier=
|
|||||||
section_container = $('.section-tables-active')
|
section_container = $('.section-tables-active')
|
||||||
section_container.append(table_container)
|
section_container.append(table_container)
|
||||||
Qsupplier.position_table_in_active_section(section_container, table_container)
|
Qsupplier.position_table_in_active_section(section_container, table_container)
|
||||||
position_table_in_active_section: (section_container, table_container)->
|
|
||||||
|
# Set the section id of the table in the database
|
||||||
|
$.ajax(
|
||||||
|
type: 'PUT',
|
||||||
|
url: '/supplier/tables/'+table_container.data('table-id'),
|
||||||
|
data: {table: {section_id: current_section_id}},
|
||||||
|
dataType: 'json'
|
||||||
|
)
|
||||||
|
position_table_in_active_section: (section_container, table_container, skip_persisting)->
|
||||||
|
skip_persisting ||= false
|
||||||
button_container = table_container.find('.action-button-container')
|
button_container = table_container.find('.action-button-container')
|
||||||
button_container.html('')
|
button_container.html('')
|
||||||
button_container.append($('<button class="btn btn-warning btn-mini">x</button>').click( -> Qsupplier.move_table_to_inactive_section(table_container.data('table-id')) ))
|
button_container.append($('<button class="btn btn-warning btn-mini">x</button>').click( -> Qsupplier.move_table_to_inactive_section(table_container.data('table-id')) ))
|
||||||
@@ -29,13 +38,6 @@ root.Qsupplier=
|
|||||||
dataType: 'json'
|
dataType: 'json'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
#TODO make ajax call safe
|
|
||||||
$.ajax(
|
|
||||||
type: 'PUT',
|
|
||||||
url: '/supplier/tables/'+table_container.data('table-id'),
|
|
||||||
data: {table: {section_id: current_section_id}},
|
|
||||||
dataType: 'json'
|
|
||||||
)
|
|
||||||
move_table_to_inactive_section: (table_id)->
|
move_table_to_inactive_section: (table_id)->
|
||||||
table_container = $('#section-table-'+table_id)
|
table_container = $('#section-table-'+table_id)
|
||||||
table_container.css('left', 'auto')
|
table_container.css('left', 'auto')
|
||||||
|
|||||||
@@ -0,0 +1,286 @@
|
|||||||
|
@import compass
|
||||||
|
@import mixins
|
||||||
|
|
||||||
|
// Contents:
|
||||||
|
// =General
|
||||||
|
// =Breadcrumbs
|
||||||
|
// =Headings
|
||||||
|
// =Navigation
|
||||||
|
// =Forms
|
||||||
|
// =Tables
|
||||||
|
// =Pagination
|
||||||
|
// =Misc
|
||||||
|
|
||||||
|
$color: #c6c6c6
|
||||||
|
$bg: #2f2f2f
|
||||||
|
$link: #0088cc
|
||||||
|
|
||||||
|
$warning: #faa732
|
||||||
|
$success: #5bb75b
|
||||||
|
$error: #fc5b5e
|
||||||
|
|
||||||
|
// ds original: #FB292D
|
||||||
|
$info: #3a87ad
|
||||||
|
|
||||||
|
$input-bg: #666666
|
||||||
|
|
||||||
|
// ds default: #444
|
||||||
|
$input-border: #111111
|
||||||
|
|
||||||
|
// default: white
|
||||||
|
$input-placeholder: #666666
|
||||||
|
$input-color: white
|
||||||
|
|
||||||
|
//=General ========================================
|
||||||
|
// Everything with the inset panel just extends .well
|
||||||
|
.well
|
||||||
|
+inset-panel-dark
|
||||||
|
|
||||||
|
body
|
||||||
|
background: $bg
|
||||||
|
color: $color
|
||||||
|
|
||||||
|
//=Breadcrumbs =======================================
|
||||||
|
.breadcrumb
|
||||||
|
@extend .well
|
||||||
|
border: 0
|
||||||
|
//over bs
|
||||||
|
li
|
||||||
|
text-shadow: 0 1px 0 #000
|
||||||
|
//over bs
|
||||||
|
|
||||||
|
//=Headings ======================================
|
||||||
|
.page-header
|
||||||
|
+horizontal-rule-dark
|
||||||
|
|
||||||
|
h1,h2,h3,h4,h5,h6
|
||||||
|
color: white
|
||||||
|
|
||||||
|
h6
|
||||||
|
color: #999
|
||||||
|
|
||||||
|
//=Navigation
|
||||||
|
.nav .dropdown-menu
|
||||||
|
|
||||||
|
.nav-tabs .open .dropdown-toggle,
|
||||||
|
.nav-pills .open .dropdown-toggle,
|
||||||
|
.nav > .open.active > a:hover
|
||||||
|
background-color: darken($bg, 5%)
|
||||||
|
border-color: $bg $bg transparent $bg
|
||||||
|
|
||||||
|
.nav > .dropdown.active > a:hover
|
||||||
|
color: #fff
|
||||||
|
|
||||||
|
.nav-tabs .active .dropdown-toggle .caret,
|
||||||
|
.nav-pills .active .dropdown-toggle .caret
|
||||||
|
border-top-color: #fff
|
||||||
|
|
||||||
|
.nav-tabs
|
||||||
|
border-bottom: 1px solid #666
|
||||||
|
& > .active > a,
|
||||||
|
& > .active > a:hover
|
||||||
|
background-color: $bg
|
||||||
|
color: #fff
|
||||||
|
border-color: #666 #666 transparent #666
|
||||||
|
& > li > a:hover
|
||||||
|
border-color: $bg $bg #666666 $bg
|
||||||
|
background-color: darken($bg, 5%)
|
||||||
|
color: lighten($link, 10%)
|
||||||
|
&.nav-stacked
|
||||||
|
& > li > a,
|
||||||
|
& > li > a:hover
|
||||||
|
border-color: #666
|
||||||
|
|
||||||
|
.nav-pills
|
||||||
|
& > li > a:hover
|
||||||
|
background-color: darken($bg, 5%)
|
||||||
|
color: lighten($link, 10%)
|
||||||
|
|
||||||
|
.nav-list > li > a,
|
||||||
|
.nav-list .nav-header
|
||||||
|
text-shadow: 0 1px 0 #000
|
||||||
|
|
||||||
|
.nav-list > li > a:hover
|
||||||
|
background-color: darken($bg, 10%)
|
||||||
|
color: lighten($link, 10%)
|
||||||
|
|
||||||
|
.nav-list .active
|
||||||
|
& > a:hover
|
||||||
|
background-color: #0088cc
|
||||||
|
color: white
|
||||||
|
|
||||||
|
.tabs-below .nav-tabs
|
||||||
|
border-top: 1px solid #666
|
||||||
|
|
||||||
|
.tabs-left .nav-tabs
|
||||||
|
border-right: 1px solid #666
|
||||||
|
|
||||||
|
.tabs-right .nav-tabs
|
||||||
|
border-left: 1px solid #666
|
||||||
|
|
||||||
|
.tabs-below .nav-tabs > li > a:hover
|
||||||
|
border-top: 1px solid #666
|
||||||
|
|
||||||
|
.tabs-left .nav-tabs > li > a:hover
|
||||||
|
border-color: transparent #666 transparent transparent
|
||||||
|
|
||||||
|
.tabs-right .nav-tabs > li > a:hover
|
||||||
|
border-color: transparent transparent transparent #666
|
||||||
|
|
||||||
|
.tabs-below .nav-tabs .active > a,
|
||||||
|
.tabs-below .nav-tabs .active > a:hover
|
||||||
|
border-color: transparent #666 #666 #666
|
||||||
|
|
||||||
|
.tabs-left .nav-tabs .active > a,
|
||||||
|
.tabs-left .nav-tabs .active > a:hover
|
||||||
|
border-color: #666 transparent #666 #666
|
||||||
|
|
||||||
|
.tabs-right .nav-tabs .active > a,
|
||||||
|
.tabs-right .nav-tabs .active > a:hover
|
||||||
|
border-color: #666 #666 #666 transparent
|
||||||
|
|
||||||
|
//=Forms ========================================
|
||||||
|
+placeholder($input-placeholder)
|
||||||
|
|
||||||
|
.input-prepend .add-on,
|
||||||
|
.input-append .add-on
|
||||||
|
background: #444
|
||||||
|
color: $color
|
||||||
|
border-color: #111
|
||||||
|
text-shadow: 0 1px 0 black
|
||||||
|
|
||||||
|
label
|
||||||
|
color: $color
|
||||||
|
|
||||||
|
input,
|
||||||
|
input[type="file"],
|
||||||
|
select,
|
||||||
|
textarea
|
||||||
|
color: $input-color
|
||||||
|
//background-color: $input-bg;
|
||||||
|
border-color: $input-border
|
||||||
|
@extend .well
|
||||||
|
|
||||||
|
.search-query
|
||||||
|
-webkit-box-shadow: rgba(255, 255, 255, 0.1) 0 1px 0, rgba(0, 0, 0, 0) 0 1px 7px 0px inset
|
||||||
|
|
||||||
|
legend
|
||||||
|
color: white
|
||||||
|
+horizontal-rule-dark
|
||||||
|
|
||||||
|
.form-actions
|
||||||
|
border-top-color: #222
|
||||||
|
background-color: #444
|
||||||
|
|
||||||
|
.help-inline
|
||||||
|
color: #999
|
||||||
|
|
||||||
|
.control-group
|
||||||
|
&.warning
|
||||||
|
+controls($warning)
|
||||||
|
&.success
|
||||||
|
+controls($success)
|
||||||
|
&.error
|
||||||
|
+controls($error)
|
||||||
|
|
||||||
|
//=Tables ========================================
|
||||||
|
.table
|
||||||
|
thead
|
||||||
|
color: white
|
||||||
|
td
|
||||||
|
border-top-color: #666
|
||||||
|
|
||||||
|
.table-striped
|
||||||
|
tbody tr:nth-child(2n+1)
|
||||||
|
td, th
|
||||||
|
background-color: #444
|
||||||
|
|
||||||
|
.table-bordered
|
||||||
|
border: 1px solid #666
|
||||||
|
th + th,
|
||||||
|
td + td,
|
||||||
|
th + td,
|
||||||
|
td + th
|
||||||
|
border-left: 1px solid #666
|
||||||
|
|
||||||
|
//=Pagination
|
||||||
|
.pagination a:hover
|
||||||
|
color: lighten($link, 10%)
|
||||||
|
background-color: darken($bg, 5%)
|
||||||
|
|
||||||
|
.pagination .active a
|
||||||
|
color: #fff
|
||||||
|
background-color: darken($bg, 5%)
|
||||||
|
|
||||||
|
.pagination a
|
||||||
|
border-color: #666
|
||||||
|
|
||||||
|
//=Pager
|
||||||
|
.pager a
|
||||||
|
background-color: $bg
|
||||||
|
border-color: #666
|
||||||
|
&:hover
|
||||||
|
background-color: darken($bg, 5%)
|
||||||
|
color: lighten($link, 10%)
|
||||||
|
|
||||||
|
//=Alerts
|
||||||
|
=alert($color)
|
||||||
|
color: #fff
|
||||||
|
background-color: $color
|
||||||
|
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25)
|
||||||
|
border-color: darken($color, 25%)
|
||||||
|
h4
|
||||||
|
color: darken($color, 20%)
|
||||||
|
|
||||||
|
.alert
|
||||||
|
+alert($warning)
|
||||||
|
|
||||||
|
.alert-success
|
||||||
|
+alert($success)
|
||||||
|
|
||||||
|
.alert-error
|
||||||
|
+alert($error)
|
||||||
|
|
||||||
|
.alert-info
|
||||||
|
+alert($info)
|
||||||
|
|
||||||
|
//=Modals
|
||||||
|
|
||||||
|
.modal
|
||||||
|
background-color: #444
|
||||||
|
|
||||||
|
.modal-header
|
||||||
|
border-bottom: 1px solid #222
|
||||||
|
|
||||||
|
.modal-body p
|
||||||
|
color: $color
|
||||||
|
|
||||||
|
.modal-footer
|
||||||
|
background-color: darken(#444444, 5%)
|
||||||
|
border-top: 1px solid #222
|
||||||
|
+box-shadow(0 1px 0 #333333 inset)
|
||||||
|
|
||||||
|
//=Progress bars
|
||||||
|
.progress
|
||||||
|
@extend .well
|
||||||
|
|
||||||
|
//=Misc ========================================
|
||||||
|
blockquote
|
||||||
|
border-left-color: #111
|
||||||
|
&.pull-right
|
||||||
|
border-right-color: #111
|
||||||
|
|
||||||
|
hr
|
||||||
|
+horizontal-rule-dark
|
||||||
|
border-top: none
|
||||||
|
|
||||||
|
code
|
||||||
|
@extend .well
|
||||||
|
border: none
|
||||||
|
//over bs
|
||||||
|
|
||||||
|
pre
|
||||||
|
@extend .well
|
||||||
|
border: none
|
||||||
|
//over bs
|
||||||
|
color: $color
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
=placeholder($color: $input-placeholder)
|
||||||
|
\:-moz-placeholder
|
||||||
|
color: $color
|
||||||
|
\::-webkit-input-placeholder
|
||||||
|
color: $color
|
||||||
|
|
||||||
|
=controls($color)
|
||||||
|
& > label,
|
||||||
|
.help-block,
|
||||||
|
.help-inline
|
||||||
|
color: $color
|
||||||
|
input, select, textarea
|
||||||
|
//color: lighten($color, 20%);
|
||||||
|
color: $color
|
||||||
|
border-color: $color
|
||||||
|
input:focus,
|
||||||
|
select:focus,
|
||||||
|
textarea:focus
|
||||||
|
border-color: $color
|
||||||
|
+box-shadow(0 0 6px $color)
|
||||||
|
|
||||||
|
=inset-panel-dark
|
||||||
|
+box-shadow(rgba(white, 0.1) 0 1px 0, rgba(black, 0.8) 0 1px 7px 0px inset)
|
||||||
|
background: darken(#2f2f2f, 6)
|
||||||
|
background-color: rgba(black, 0.3)
|
||||||
|
|
||||||
|
=horizontal-rule-dark
|
||||||
|
+box-shadow(rgba(white, 0.07) 0 1px 0)
|
||||||
|
border-bottom: 1px solid #121212
|
||||||
|
|
||||||
|
=horizontal-rule-top-dark
|
||||||
|
+box-shadow(rgba(white, 0.07) 0 1px 0 inset)
|
||||||
|
border-top: 1px solid #121212
|
||||||
|
|
||||||
|
=vertical-rule-dark
|
||||||
|
+box-shadow(rgba(white, 0.07) 1px 0 0)
|
||||||
|
border-right: 1px solid #121212
|
||||||
|
|
||||||
|
=vertical-rule-left-dark
|
||||||
|
+box-shadow(rgba(white, 0.07) 1px 0 0 inset)
|
||||||
|
border-left: 1px solid #121212
|
||||||
@@ -1,7 +1,52 @@
|
|||||||
|
@import compass
|
||||||
$side-spacing: 5px
|
$side-spacing: 5px
|
||||||
|
$qbrown: #8B5A2B
|
||||||
|
html
|
||||||
|
background-image: image-url('textures/wood5.jpg')
|
||||||
body
|
body
|
||||||
padding-left: $side-spacing
|
padding-left: $side-spacing
|
||||||
padding-right: $side-spacing
|
padding-right: $side-spacing
|
||||||
|
background-image: image-url('textures/wood5.jpg')
|
||||||
|
.home-panel
|
||||||
|
margin-left: 20px
|
||||||
|
margin-right: 20px
|
||||||
|
margin-top: 40px
|
||||||
|
+box-shadow(#000 10px 10px 16px)
|
||||||
|
background-color: rgba(240, 240, 240, 0.6)
|
||||||
|
+border-radius(10px)
|
||||||
|
.home-header
|
||||||
|
text-align: center
|
||||||
|
//background-color: #eee
|
||||||
|
//+border-top-radius(10px)
|
||||||
|
//+opacity(0.7)
|
||||||
|
min-height: 100px
|
||||||
|
.home-center
|
||||||
|
padding: 10px
|
||||||
|
text-align: center
|
||||||
|
background-color: black
|
||||||
|
.home-footer
|
||||||
|
//background-color: #eee
|
||||||
|
//+border-bottom-radius(10px)
|
||||||
|
//+opacity(0.7)
|
||||||
|
min-height: 100px
|
||||||
|
.home-footer-content
|
||||||
|
margin-top: 22px
|
||||||
|
margin-left: auto
|
||||||
|
margin-right: auto
|
||||||
|
background-color: green
|
||||||
|
width: 262px
|
||||||
|
a
|
||||||
|
display: block
|
||||||
|
border: 2px solid black
|
||||||
|
+border-radius(4px)
|
||||||
|
+box-shadow(#000 4px 4px 8px)
|
||||||
|
width: 34px
|
||||||
|
height: 34px
|
||||||
|
float: left
|
||||||
|
margin-right: 15px
|
||||||
|
background-color: $qbrown
|
||||||
|
text-align: center
|
||||||
|
line-height: 34px
|
||||||
//padding-top: 50px
|
//padding-top: 50px
|
||||||
.navbar-fixed-top
|
.navbar-fixed-top
|
||||||
margin-left: -$side-spacing
|
margin-left: -$side-spacing
|
||||||
|
|||||||
@@ -0,0 +1,286 @@
|
|||||||
|
@import compass
|
||||||
|
@import mixins
|
||||||
|
|
||||||
|
// Contents:
|
||||||
|
// =General
|
||||||
|
// =Breadcrumbs
|
||||||
|
// =Headings
|
||||||
|
// =Navigation
|
||||||
|
// =Forms
|
||||||
|
// =Tables
|
||||||
|
// =Pagination
|
||||||
|
// =Misc
|
||||||
|
|
||||||
|
$color: #c6c6c6
|
||||||
|
$bg: #2f2f2f
|
||||||
|
$link: #0088cc
|
||||||
|
|
||||||
|
$warning: #faa732
|
||||||
|
$success: #5bb75b
|
||||||
|
$error: #fc5b5e
|
||||||
|
|
||||||
|
// ds original: #FB292D
|
||||||
|
$info: #3a87ad
|
||||||
|
|
||||||
|
$input-bg: #666666
|
||||||
|
|
||||||
|
// ds default: #444
|
||||||
|
$input-border: #111111
|
||||||
|
|
||||||
|
// default: white
|
||||||
|
$input-placeholder: #666666
|
||||||
|
$input-color: white
|
||||||
|
|
||||||
|
//=General ========================================
|
||||||
|
// Everything with the inset panel just extends .well
|
||||||
|
.well
|
||||||
|
+inset-panel-dark
|
||||||
|
|
||||||
|
body
|
||||||
|
background: $bg
|
||||||
|
color: $color
|
||||||
|
|
||||||
|
//=Breadcrumbs =======================================
|
||||||
|
.breadcrumb
|
||||||
|
@extend .well
|
||||||
|
border: 0
|
||||||
|
//over bs
|
||||||
|
li
|
||||||
|
text-shadow: 0 1px 0 #000
|
||||||
|
//over bs
|
||||||
|
|
||||||
|
//=Headings ======================================
|
||||||
|
.page-header
|
||||||
|
+horizontal-rule-dark
|
||||||
|
|
||||||
|
h1,h2,h3,h4,h5,h6
|
||||||
|
color: white
|
||||||
|
|
||||||
|
h6
|
||||||
|
color: #999
|
||||||
|
|
||||||
|
//=Navigation
|
||||||
|
.nav .dropdown-menu
|
||||||
|
|
||||||
|
.nav-tabs .open .dropdown-toggle,
|
||||||
|
.nav-pills .open .dropdown-toggle,
|
||||||
|
.nav > .open.active > a:hover
|
||||||
|
background-color: darken($bg, 5%)
|
||||||
|
border-color: $bg $bg transparent $bg
|
||||||
|
|
||||||
|
.nav > .dropdown.active > a:hover
|
||||||
|
color: #fff
|
||||||
|
|
||||||
|
.nav-tabs .active .dropdown-toggle .caret,
|
||||||
|
.nav-pills .active .dropdown-toggle .caret
|
||||||
|
border-top-color: #fff
|
||||||
|
|
||||||
|
.nav-tabs
|
||||||
|
border-bottom: 1px solid #666
|
||||||
|
& > .active > a,
|
||||||
|
& > .active > a:hover
|
||||||
|
background-color: $bg
|
||||||
|
color: #fff
|
||||||
|
border-color: #666 #666 transparent #666
|
||||||
|
& > li > a:hover
|
||||||
|
border-color: $bg $bg #666666 $bg
|
||||||
|
background-color: darken($bg, 5%)
|
||||||
|
color: lighten($link, 10%)
|
||||||
|
&.nav-stacked
|
||||||
|
& > li > a,
|
||||||
|
& > li > a:hover
|
||||||
|
border-color: #666
|
||||||
|
|
||||||
|
.nav-pills
|
||||||
|
& > li > a:hover
|
||||||
|
background-color: darken($bg, 5%)
|
||||||
|
color: lighten($link, 10%)
|
||||||
|
|
||||||
|
.nav-list > li > a,
|
||||||
|
.nav-list .nav-header
|
||||||
|
text-shadow: 0 1px 0 #000
|
||||||
|
|
||||||
|
.nav-list > li > a:hover
|
||||||
|
background-color: darken($bg, 10%)
|
||||||
|
color: lighten($link, 10%)
|
||||||
|
|
||||||
|
.nav-list .active
|
||||||
|
& > a:hover
|
||||||
|
background-color: #0088cc
|
||||||
|
color: white
|
||||||
|
|
||||||
|
.tabs-below .nav-tabs
|
||||||
|
border-top: 1px solid #666
|
||||||
|
|
||||||
|
.tabs-left .nav-tabs
|
||||||
|
border-right: 1px solid #666
|
||||||
|
|
||||||
|
.tabs-right .nav-tabs
|
||||||
|
border-left: 1px solid #666
|
||||||
|
|
||||||
|
.tabs-below .nav-tabs > li > a:hover
|
||||||
|
border-top: 1px solid #666
|
||||||
|
|
||||||
|
.tabs-left .nav-tabs > li > a:hover
|
||||||
|
border-color: transparent #666 transparent transparent
|
||||||
|
|
||||||
|
.tabs-right .nav-tabs > li > a:hover
|
||||||
|
border-color: transparent transparent transparent #666
|
||||||
|
|
||||||
|
.tabs-below .nav-tabs .active > a,
|
||||||
|
.tabs-below .nav-tabs .active > a:hover
|
||||||
|
border-color: transparent #666 #666 #666
|
||||||
|
|
||||||
|
.tabs-left .nav-tabs .active > a,
|
||||||
|
.tabs-left .nav-tabs .active > a:hover
|
||||||
|
border-color: #666 transparent #666 #666
|
||||||
|
|
||||||
|
.tabs-right .nav-tabs .active > a,
|
||||||
|
.tabs-right .nav-tabs .active > a:hover
|
||||||
|
border-color: #666 #666 #666 transparent
|
||||||
|
|
||||||
|
//=Forms ========================================
|
||||||
|
+placeholder($input-placeholder)
|
||||||
|
|
||||||
|
.input-prepend .add-on,
|
||||||
|
.input-append .add-on
|
||||||
|
background: #444
|
||||||
|
color: $color
|
||||||
|
border-color: #111
|
||||||
|
text-shadow: 0 1px 0 black
|
||||||
|
|
||||||
|
label
|
||||||
|
color: $color
|
||||||
|
|
||||||
|
input,
|
||||||
|
input[type="file"],
|
||||||
|
select,
|
||||||
|
textarea
|
||||||
|
color: $input-color
|
||||||
|
//background-color: $input-bg;
|
||||||
|
border-color: $input-border
|
||||||
|
@extend .well
|
||||||
|
|
||||||
|
.search-query
|
||||||
|
-webkit-box-shadow: rgba(255, 255, 255, 0.1) 0 1px 0, rgba(0, 0, 0, 0) 0 1px 7px 0px inset
|
||||||
|
|
||||||
|
legend
|
||||||
|
color: white
|
||||||
|
+horizontal-rule-dark
|
||||||
|
|
||||||
|
.form-actions
|
||||||
|
border-top-color: #222
|
||||||
|
background-color: #444
|
||||||
|
|
||||||
|
.help-inline
|
||||||
|
color: #999
|
||||||
|
|
||||||
|
.control-group
|
||||||
|
&.warning
|
||||||
|
+controls($warning)
|
||||||
|
&.success
|
||||||
|
+controls($success)
|
||||||
|
&.error
|
||||||
|
+controls($error)
|
||||||
|
|
||||||
|
//=Tables ========================================
|
||||||
|
.table
|
||||||
|
thead
|
||||||
|
color: white
|
||||||
|
td
|
||||||
|
border-top-color: #666
|
||||||
|
|
||||||
|
.table-striped
|
||||||
|
tbody tr:nth-child(2n+1)
|
||||||
|
td, th
|
||||||
|
background-color: #444
|
||||||
|
|
||||||
|
.table-bordered
|
||||||
|
border: 1px solid #666
|
||||||
|
th + th,
|
||||||
|
td + td,
|
||||||
|
th + td,
|
||||||
|
td + th
|
||||||
|
border-left: 1px solid #666
|
||||||
|
|
||||||
|
//=Pagination
|
||||||
|
.pagination a:hover
|
||||||
|
color: lighten($link, 10%)
|
||||||
|
background-color: darken($bg, 5%)
|
||||||
|
|
||||||
|
.pagination .active a
|
||||||
|
color: #fff
|
||||||
|
background-color: darken($bg, 5%)
|
||||||
|
|
||||||
|
.pagination a
|
||||||
|
border-color: #666
|
||||||
|
|
||||||
|
//=Pager
|
||||||
|
.pager a
|
||||||
|
background-color: $bg
|
||||||
|
border-color: #666
|
||||||
|
&:hover
|
||||||
|
background-color: darken($bg, 5%)
|
||||||
|
color: lighten($link, 10%)
|
||||||
|
|
||||||
|
//=Alerts
|
||||||
|
=alert($color)
|
||||||
|
color: #fff
|
||||||
|
background-color: $color
|
||||||
|
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25)
|
||||||
|
border-color: darken($color, 25%)
|
||||||
|
h4
|
||||||
|
color: darken($color, 20%)
|
||||||
|
|
||||||
|
.alert
|
||||||
|
+alert($warning)
|
||||||
|
|
||||||
|
.alert-success
|
||||||
|
+alert($success)
|
||||||
|
|
||||||
|
.alert-error
|
||||||
|
+alert($error)
|
||||||
|
|
||||||
|
.alert-info
|
||||||
|
+alert($info)
|
||||||
|
|
||||||
|
//=Modals
|
||||||
|
|
||||||
|
.modal
|
||||||
|
background-color: #444
|
||||||
|
|
||||||
|
.modal-header
|
||||||
|
border-bottom: 1px solid #222
|
||||||
|
|
||||||
|
.modal-body p
|
||||||
|
color: $color
|
||||||
|
|
||||||
|
.modal-footer
|
||||||
|
background-color: darken(#444444, 5%)
|
||||||
|
border-top: 1px solid #222
|
||||||
|
+box-shadow(0 1px 0 #333333 inset)
|
||||||
|
|
||||||
|
//=Progress bars
|
||||||
|
.progress
|
||||||
|
@extend .well
|
||||||
|
|
||||||
|
//=Misc ========================================
|
||||||
|
blockquote
|
||||||
|
border-left-color: #111
|
||||||
|
&.pull-right
|
||||||
|
border-right-color: #111
|
||||||
|
|
||||||
|
hr
|
||||||
|
+horizontal-rule-dark
|
||||||
|
border-top: none
|
||||||
|
|
||||||
|
code
|
||||||
|
@extend .well
|
||||||
|
border: none
|
||||||
|
//over bs
|
||||||
|
|
||||||
|
pre
|
||||||
|
@extend .well
|
||||||
|
border: none
|
||||||
|
//over bs
|
||||||
|
color: $color
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
=placeholder($color: $input-placeholder)
|
||||||
|
\:-moz-placeholder
|
||||||
|
color: $color
|
||||||
|
\::-webkit-input-placeholder
|
||||||
|
color: $color
|
||||||
|
|
||||||
|
=controls($color)
|
||||||
|
& > label,
|
||||||
|
.help-block,
|
||||||
|
.help-inline
|
||||||
|
color: $color
|
||||||
|
input, select, textarea
|
||||||
|
//color: lighten($color, 20%);
|
||||||
|
color: $color
|
||||||
|
border-color: $color
|
||||||
|
input:focus,
|
||||||
|
select:focus,
|
||||||
|
textarea:focus
|
||||||
|
border-color: $color
|
||||||
|
+box-shadow(0 0 6px $color)
|
||||||
|
|
||||||
|
=inset-panel-dark
|
||||||
|
+box-shadow(rgba(white, 0.1) 0 1px 0, rgba(black, 0.8) 0 1px 7px 0px inset)
|
||||||
|
background: darken(#2f2f2f, 6)
|
||||||
|
background-color: rgba(black, 0.3)
|
||||||
|
|
||||||
|
=horizontal-rule-dark
|
||||||
|
+box-shadow(rgba(white, 0.07) 0 1px 0)
|
||||||
|
border-bottom: 1px solid #121212
|
||||||
|
|
||||||
|
=horizontal-rule-top-dark
|
||||||
|
+box-shadow(rgba(white, 0.07) 0 1px 0 inset)
|
||||||
|
border-top: 1px solid #121212
|
||||||
|
|
||||||
|
=vertical-rule-dark
|
||||||
|
+box-shadow(rgba(white, 0.07) 1px 0 0)
|
||||||
|
border-right: 1px solid #121212
|
||||||
|
|
||||||
|
=vertical-rule-left-dark
|
||||||
|
+box-shadow(rgba(white, 0.07) 1px 0 0 inset)
|
||||||
|
border-left: 1px solid #121212
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
$side-spacing: 5px
|
$side-spacing: 0px
|
||||||
body
|
body
|
||||||
padding-left: $side-spacing
|
padding-left: $side-spacing
|
||||||
padding-right: $side-spacing
|
padding-right: $side-spacing
|
||||||
|
background-image: image-url('textures/wood5.jpg')
|
||||||
//padding-top: 50px
|
//padding-top: 50px
|
||||||
.navbar-fixed-top
|
.navbar-fixed-top
|
||||||
margin-left: -$side-spacing
|
margin-left: -$side-spacing
|
||||||
@@ -33,7 +34,7 @@ body
|
|||||||
position: relative
|
position: relative
|
||||||
padding: 0
|
padding: 0
|
||||||
height: 400px
|
height: 400px
|
||||||
background-image: image-url('textures/wood4.jpg')
|
background-image: image-url('textures/wood5.jpg')
|
||||||
.section-table
|
.section-table
|
||||||
position: absolute
|
position: absolute
|
||||||
cursor: move
|
cursor: move
|
||||||
|
|||||||
@@ -21,8 +21,17 @@ class DashboardController < ApplicationController
|
|||||||
code = {table_id: @table.id}.to_json
|
code = {table_id: @table.id}.to_json
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
format.svg { render :qrcode => code, :level => :l, :unit => 10, table_number: @table.number }
|
format.svg { render :qrcode => code, :level => :l, :unit => 10, table_number: @table.number, qcontainer: true }
|
||||||
format.png { render qrcode: code, table_number: @table.number }
|
format.png { render qrcode: code, table_number: @table.number, qcontainer: true }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def qr
|
||||||
|
code = 'qwaiter.com'
|
||||||
|
respond_to do |format|
|
||||||
|
format.html
|
||||||
|
format.svg { render :qrcode => code, :level => :l, :unit => 10}
|
||||||
|
format.png { render qrcode: code}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ module Suppliers
|
|||||||
# PUT /sections/1
|
# PUT /sections/1
|
||||||
# PUT /sections/1.json
|
# PUT /sections/1.json
|
||||||
def update
|
def update
|
||||||
@section = Section.find(params[:id])
|
@section = Section.find_by_supplier_and_id(current_supplier, params[:id])
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @section.update_attributes(params[:section])
|
if @section.update_attributes(params[:section])
|
||||||
|
|||||||
@@ -14,6 +14,14 @@ class Section
|
|||||||
|
|
||||||
validates :supplier_id, presence: true
|
validates :supplier_id, presence: true
|
||||||
|
|
||||||
|
# Probably faster to directly retreive the document and return nil
|
||||||
|
# if the supplier does not match
|
||||||
|
def self.find_by_supplier_and_id(supplier, id)
|
||||||
|
section = find(id)
|
||||||
|
return nil unless section.supplier_id == supplier.id
|
||||||
|
section
|
||||||
|
end
|
||||||
|
|
||||||
def width
|
def width
|
||||||
self.path.last.try(:first).to_f - self.path.first.try(:first).to_f
|
self.path.last.try(:first).to_f - self.path.first.try(:first).to_f
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ html lang="en"
|
|||||||
activateRotation: function(){}
|
activateRotation: function(){}
|
||||||
});
|
});
|
||||||
|
|
||||||
body
|
body class=action_name
|
||||||
.navbar.navbar-fixed-top
|
.navbar.navbar-fixed-top
|
||||||
.navbar-inner
|
.navbar-inner
|
||||||
.container
|
.container
|
||||||
|
|||||||
@@ -20,5 +20,6 @@
|
|||||||
= link_to t("helpers.links.destroy"), [:suppliers, product_category], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
|
= link_to t("helpers.links.destroy"), [:suppliers, product_category], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
|
||||||
- else
|
- else
|
||||||
= no_content_given model_class
|
= no_content_given model_class
|
||||||
= link_to t("helpers.links.new"), new_suppliers_product_category_path, class: 'btn btn-primary'
|
.form-actions
|
||||||
|
= link_to t("helpers.links.new"), new_suppliers_product_category_path, class: 'btn btn-primary'
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,6 @@
|
|||||||
active_section_container.css('width', active_section_container.width()); // break fluid layout
|
active_section_container.css('width', active_section_container.width()); // break fluid layout
|
||||||
active_section_container.css('height', #{@section.height/@section.width}*active_section_container.width());
|
active_section_container.css('height', #{@section.height/@section.width}*active_section_container.width());
|
||||||
active_section_container.find('.section-table').each(function(){
|
active_section_container.find('.section-table').each(function(){
|
||||||
Qsupplier.position_table_in_active_section(active_section_container, $(this));
|
Qsupplier.position_table_in_active_section(active_section_container, $(this), true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
ul.nav.nav-tabs.nav-stacked
|
.home-panel
|
||||||
li
|
.home-header = image_tag 'logo.png', width: '150', height: '140'
|
||||||
button.btn.btn-primary onClick="QMobile.scanQr()" = t('user.home.scan_qr')
|
.home-center
|
||||||
- if list_open?
|
a href="#" onClick="QMobile.scanQr()" = image_tag 'scan-logo.png'
|
||||||
li= link_to t('user.home.show_active_list_products'), user_list_products_path
|
.home-footer
|
||||||
li= link_to t('user.home.show_active_list'), user_active_list_path
|
.home-footer-content
|
||||||
|
- if list_open?
|
||||||
|
= link_to 'P', user_list_products_path
|
||||||
|
= link_to 'L', user_active_list_path
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ Qrammer::Application.routes.draw do
|
|||||||
|
|
||||||
match '/show_products' => 'dashboard#show_products', as: :user_products
|
match '/show_products' => 'dashboard#show_products', as: :user_products
|
||||||
|
|
||||||
|
match '/qr' => 'dashboard#qr'
|
||||||
|
|
||||||
namespace :suppliers, path: '/supplier' do
|
namespace :suppliers, path: '/supplier' do
|
||||||
resources :sections
|
resources :sections
|
||||||
resources :tables
|
resources :tables
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ module RQRCode
|
|||||||
result.unshift %{<rect width="#{dimension}" height="#{dimension}" x="0" y="0" style="fill:##{options[:fill]}"/>}
|
result.unshift %{<rect width="#{dimension}" height="#{dimension}" x="0" y="0" style="fill:##{options[:fill]}"/>}
|
||||||
end
|
end
|
||||||
|
|
||||||
svg = [xml_tag, open_tag, result, close_tag].flatten.join("\n")
|
return [xml_tag, open_tag, result, close_tag].flatten.join("\n") unless options[:qcontainer]
|
||||||
svg = File.read(File.expand_path('../../qr_container.svg', __FILE__))
|
svg = File.read(File.expand_path('../../qr_container.svg', __FILE__))
|
||||||
svg.gsub!(/#table_number/, options[:table_number].to_s)
|
svg.gsub!(/#table_number/, options[:table_number].to_s)
|
||||||
svg.gsub!(/#qrcode/, result.join("\n"))
|
svg.gsub!(/#qrcode/, result.join("\n"))
|
||||||
|
|||||||
Reference in New Issue
Block a user