[+] Helper form WIP
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
"modernizr": "~2.6.2",
|
||||
"jquery": "~1.9.1",
|
||||
"bootstrap": "https://github.com/twitter/bootstrap/archive/3.0.0-wip.zip",
|
||||
"font-awesome": "~3.2.1-wip"
|
||||
"font-awesome": "~3.2.1-wip",
|
||||
"sass-twitter-bootstrap": "https://github.com/jlong/sass-twitter-bootstrap/archive/3.0.0-wip.zip"
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,16 +1,15 @@
|
||||
@import "_bootstrap.scss"
|
||||
@import "_font-awesome.scss"
|
||||
@import "_toggle-switch.scss"
|
||||
@import "bootstrap/variables"
|
||||
@import "bootstrap"
|
||||
@import "font-awesome"
|
||||
@import "toggle-switch"
|
||||
|
||||
html, body
|
||||
height: 100%
|
||||
background: #EEEEEE
|
||||
|
||||
body.fixed-top
|
||||
position: relative
|
||||
top: 56px
|
||||
margin-bottom: 50px
|
||||
font-family: 'Open Sans', sans-serif
|
||||
|
||||
#main
|
||||
position: relative
|
||||
@@ -21,13 +20,13 @@ body.fixed-top
|
||||
float: left
|
||||
width: 1280px
|
||||
min-height: 100%
|
||||
padding: 20px 20px 90px 20px
|
||||
padding: 10px 20px 90px
|
||||
margin: 0 0 0 240px
|
||||
border-left: 2px solid black
|
||||
background-color: white
|
||||
|
||||
.page-sidebar
|
||||
top: 65px
|
||||
top: 56px
|
||||
position: fixed
|
||||
width: 240px
|
||||
> ul
|
||||
@@ -119,7 +118,7 @@ body.fixed-top
|
||||
margin-bottom: 5px
|
||||
|
||||
#menu .maintab > a [class^="icon-"], #menu .maintab > a [class*=" icon-"]
|
||||
font-size: 18px
|
||||
font-size: 22px
|
||||
border-radius: 35px
|
||||
height: 30px
|
||||
width: 30px
|
||||
@@ -129,9 +128,9 @@ body.fixed-top
|
||||
line-height: 30px
|
||||
|
||||
label span.label-tooltip
|
||||
color: #0086CE
|
||||
color: $brand-primary
|
||||
text-decoration: none
|
||||
border-bottom: dashed 1px #647858
|
||||
border-bottom: dotted 1px $brand-primary
|
||||
|
||||
label.required:before
|
||||
content: '*'
|
||||
@@ -141,6 +140,9 @@ label.required:before
|
||||
//variables
|
||||
$icon-color: #7A0928
|
||||
|
||||
.icon-AdminDashboard
|
||||
@extend .icon-dashboard
|
||||
background-color: adjust-hue($icon-color, -20)
|
||||
.icon-AdminCatalog
|
||||
@extend .icon-book
|
||||
background-color: adjust-hue($icon-color, 20)
|
||||
@@ -175,7 +177,6 @@ $icon-color: #7A0928
|
||||
@extend .icon-bar-chart
|
||||
background-color: adjust-hue($icon-color, 220)
|
||||
|
||||
|
||||
.navbar-inner
|
||||
box-shadow: none!important
|
||||
.input-append
|
||||
@@ -188,10 +189,14 @@ $icon-color: #7A0928
|
||||
padding: 2px 5px !important
|
||||
font-size: 11px
|
||||
margin-right: 3px
|
||||
border-bottom: 3px solid darken($brand-primary,10%)
|
||||
position: relative
|
||||
&:hover
|
||||
color: #3D89CC
|
||||
border-color: #3D89CC
|
||||
color: $brand-primary
|
||||
border-color: $brand-primary
|
||||
background-color: white !important
|
||||
border-bottom: 1px solid darken($brand-primary,10%)
|
||||
top: 2px
|
||||
|
||||
[class^="process-icon-"], [class*=" process-icon-"]
|
||||
height: 32px
|
||||
@@ -202,7 +207,7 @@ $icon-color: #7A0928
|
||||
font-family: FontAwesome
|
||||
font-weight: normal
|
||||
font-style: normal
|
||||
font-size: 30px
|
||||
font-size: 25px
|
||||
line-height: 32px
|
||||
text-decoration: inherit
|
||||
-webkit-font-smoothing: antialiased
|
||||
@@ -253,36 +258,34 @@ $icon-color: #7A0928
|
||||
|
||||
.page-head
|
||||
position: relative
|
||||
padding: 5px 5px 0 20px
|
||||
min-height: 63px
|
||||
padding: 4px 5px 0 20px
|
||||
min-height: 65px
|
||||
margin-bottom: 20px
|
||||
background: #EEEEEE
|
||||
.page-title
|
||||
background: lighten($brand-primary,30%)
|
||||
border-bottom: 3px solid $brand-primary
|
||||
h2.page-title
|
||||
margin: 0
|
||||
float: left
|
||||
padding: 0
|
||||
font-size: 20px
|
||||
line-height: 55px
|
||||
color: #272822
|
||||
font-weight: 300
|
||||
line-height: 60px
|
||||
color: $brand-primary
|
||||
text-transform: uppercase
|
||||
font-family: 'Ubuntu', sans-serif
|
||||
|
||||
.btn-toolbar
|
||||
margin: 0
|
||||
.nav-tabs
|
||||
margin: 0
|
||||
.nav-tabs > li > a
|
||||
color: #333
|
||||
> .active > a, > .active > a:hover
|
||||
color: #3399ff
|
||||
background: #f5f5f5
|
||||
|
||||
.page-bar
|
||||
float: right
|
||||
padding: 0
|
||||
height: 68px
|
||||
|
||||
.btn-toolbar
|
||||
margin: 0
|
||||
.nav-tabs
|
||||
margin: 0
|
||||
.nav-tabs > li > a
|
||||
color: #333
|
||||
> .active > a, > .active > a:hover
|
||||
color: #3399ff
|
||||
background: #f5f5f5
|
||||
|
||||
/////////////////////// WIP DRAFT
|
||||
//form
|
||||
select.input-tiny,
|
||||
@@ -358,3 +361,7 @@ input[type="text"].filter, input[type="password"].filter, select.filter
|
||||
form .alert
|
||||
clear: both
|
||||
|
||||
#notifs_icon_wrapper i
|
||||
font-size: 1.5em
|
||||
color: white
|
||||
|
||||
|
||||
@@ -0,0 +1,429 @@
|
||||
// //
|
||||
// Variables
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Global values
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Grays
|
||||
// -------------------------
|
||||
|
||||
// $gray-darker: lighten(#000, 13.5%) ; #222
|
||||
// $gray-dark: lighten(#000, 20%) ; #333
|
||||
// $gray: lighten(#000, 33.5%) ; #555
|
||||
// $gray-light: lighten(#000, 60%) ; #999
|
||||
// $gray-lighter: lighten(#000, 93.5%) ; #eee
|
||||
|
||||
// Brand colors
|
||||
// -------------------------
|
||||
|
||||
$brand-primary: #5D8FB1 ;
|
||||
// $brand-success: #5cb85c ;
|
||||
// $brand-warning: #f0ad4e ;
|
||||
// $brand-danger: #d9534f ;
|
||||
// $brand-info: #5bc0de ;
|
||||
|
||||
// Scaffolding
|
||||
// -------------------------
|
||||
|
||||
$body-bg: #eee ;
|
||||
// $text-color: $gray-dark ;
|
||||
|
||||
// Links
|
||||
// -------------------------
|
||||
|
||||
// $link-color: $brand-primary ;
|
||||
// $link-hover-color: darken($link-color, 15%) ;
|
||||
|
||||
// Typography
|
||||
// -------------------------
|
||||
|
||||
$font-family-sans-serif: 'Open Sans', Helvetica, Arial, sans-serif ;
|
||||
// $font-family-serif: Georgia, "Times New Roman", Times, serif ;
|
||||
// $font-family-monospace: Monaco, Menlo, Consolas, "Courier New", monospace ;
|
||||
// $font-family-base: $font-family-sans-serif ;
|
||||
|
||||
$font-size-base: 12px ;
|
||||
// $font-size-large: ceil($font-size-base * 1.25) ; ~18px
|
||||
// $font-size-small: ceil($font-size-base * 0.85) ; ~12px
|
||||
// $font-size-mini: ceil($font-size-base * 0.75) ; ~11px
|
||||
|
||||
// $line-height-base: 1.428571429 ; 20/14
|
||||
// $line-height-computed: floor($font-size-base * $line-height-base) ; ~20px
|
||||
|
||||
// $headings-font-family: $font-family-base ;
|
||||
$headings-font-weight: 400 ;
|
||||
// $headings-line-height: 1.1 ;
|
||||
|
||||
|
||||
// Components
|
||||
// -------------------------
|
||||
// Based on 14px font-size and 1.428 line-height (~20px to start)
|
||||
|
||||
// $padding-base-vertical: 8px ;
|
||||
// $padding-base-horizontal: 12px ;
|
||||
|
||||
// $padding-large-vertical: 14px ;
|
||||
// $padding-large-horizontal: 16px ;
|
||||
|
||||
// $padding-small-vertical: 5px ;
|
||||
// $padding-small-horizontal: 10px ;
|
||||
|
||||
// $border-radius-base: 4px ;
|
||||
// $border-radius-large: 6px ;
|
||||
// $border-radius-small: 3px ;
|
||||
|
||||
// $component-active-bg: $brand-primary ;
|
||||
|
||||
|
||||
// Tables
|
||||
// -------------------------
|
||||
|
||||
// $table-bg: transparent ; overall background-color
|
||||
// $table-bg-accent: #f9f9f9 ; for striping
|
||||
// $table-bg-hover: #f5f5f5 ; for hover
|
||||
|
||||
// $table-border-color: #ddd ; table and cell border
|
||||
|
||||
|
||||
// Buttons
|
||||
// -------------------------
|
||||
|
||||
// $btn-default-color: #fff ;
|
||||
$btn-default-bg: #6E6E6E ;
|
||||
// $btn-default-border: $btn-default-bg ;
|
||||
|
||||
// $btn-primary-color: $btn-default-color ;
|
||||
// $btn-primary-bg: $brand-primary ;
|
||||
// $btn-primary-border: $btn-primary-bg ;
|
||||
|
||||
// $btn-success-color: $btn-default-color ;
|
||||
// $btn-success-bg: $brand-success ;
|
||||
// $btn-success-border: $btn-success-bg ;
|
||||
|
||||
// $btn-warning-color: $btn-default-color ;
|
||||
// $btn-warning-bg: $brand-warning ;
|
||||
// $btn-warning-border: $btn-warning-bg ;
|
||||
|
||||
// $btn-danger-color: $btn-default-color ;
|
||||
// $btn-danger-bg: $brand-danger ;
|
||||
// $btn-danger-border: $btn-danger-bg ;
|
||||
|
||||
// $btn-info-color: $btn-default-color ;
|
||||
// $btn-info-bg: $brand-info ;
|
||||
// $btn-info-border: $btn-info-bg ;
|
||||
|
||||
|
||||
|
||||
// Forms
|
||||
// -------------------------
|
||||
|
||||
// $input-bg: #fff ;
|
||||
// $input-bg-disabled: $gray-lighter ;
|
||||
|
||||
// $input-border: #ccc ;
|
||||
// $input-border-radius: $border-radius-base ;
|
||||
|
||||
// $input-color-placeholder: $gray-light ;
|
||||
|
||||
// $input-height-base: ($line-height-computed + ($padding-base-vertical * 2) + 2) ;
|
||||
// $input-height-large: (ceil($font-size-large * $line-height-base) + ($padding-large-vertical * 2) + 2) ;
|
||||
// $input-height-small: (ceil($font-size-small * $line-height-base) + ($padding-small-vertical * 2) + 2) ;
|
||||
|
||||
|
||||
// Dropdowns
|
||||
// -------------------------
|
||||
|
||||
// $dropdown-bg: #fff ;
|
||||
// $dropdown-border: rgba(0,0,0,.15) ;
|
||||
// $dropdown-divider-top: #e5e5e5 ;
|
||||
// $dropdown-divider-bottom: #fff ;
|
||||
|
||||
// $dropdown-link-active-color: #fff ;
|
||||
// $dropdown-link-active-bg: $component-active-bg ;
|
||||
|
||||
// $dropdown-link-color: $gray-dark ;
|
||||
// $dropdown-link-hover-color: #fff ;
|
||||
// $dropdown-link-hover-bg: $dropdown-link-active-bg ;
|
||||
|
||||
|
||||
// Grid system
|
||||
// --------------------------------------------------
|
||||
|
||||
// Number of columns in the grid system
|
||||
// $grid-columns: 12 ;
|
||||
// Padding, to be divided by two and applied to the left and right of all columns
|
||||
// $grid-gutter-width: 30px ;
|
||||
|
||||
|
||||
// COMPONENT VARIABLES
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Z-index master list
|
||||
// -------------------------
|
||||
// Used for a bird's eye view of components dependent on the z-axis
|
||||
// Try to avoid customizing these :)
|
||||
|
||||
// $zindex-dropdown: 1000 ;
|
||||
// $zindex-popover: 1010 ;
|
||||
// $zindex-tooltip: 1030 ;
|
||||
// $zindex-navbar-fixed: 1030 ;
|
||||
// $zindex-modal-background: 1040 ;
|
||||
// $zindex-modal: 1050 ;
|
||||
|
||||
|
||||
// Navbar
|
||||
// -------------------------
|
||||
|
||||
// Basics of a navbar
|
||||
// $navbar-height: 50px ;
|
||||
// $navbar-color: #777 ;
|
||||
// $navbar-bg: #eee ;
|
||||
// $navbar-padding: floor($grid-gutter-width / 2) ; ~15px
|
||||
|
||||
// Navbar links
|
||||
// $navbar-link-color: #777 ;
|
||||
// $navbar-link-hover-color: #333 ;
|
||||
// $navbar-link-hover-bg: transparent ;
|
||||
// $navbar-link-active-color: #555 ;
|
||||
// $navbar-link-active-bg: darken($navbar-bg, 10%) ;
|
||||
// $navbar-link-disabled-color: #ccc ;
|
||||
// $navbar-link-disabled-bg: transparent ;
|
||||
|
||||
// Navbar brand label
|
||||
// $navbar-brand-color: $navbar-link-color ;
|
||||
// $navbar-brand-hover-color: darken($navbar-link-color, 10%) ;
|
||||
// $navbar-brand-hover-bg: transparent ;
|
||||
|
||||
// Inverted navbar
|
||||
// $navbar-inverse-color: $gray-light ;
|
||||
// $navbar-inverse-bg: #222 ;
|
||||
|
||||
// Inverted navbar links
|
||||
// $navbar-inverse-link-color: $gray-light ;
|
||||
// $navbar-inverse-link-hover-color: #fff ;
|
||||
// $navbar-inverse-link-hover-bg: transparent ;
|
||||
// $navbar-inverse-link-active-color: $navbar-inverse-link-hover-color ;
|
||||
// $navbar-inverse-link-active-bg: darken($navbar-inverse-bg, 10%) ;
|
||||
// $navbar-inverse-link-disabled-color: #444 ;
|
||||
// $navbar-inverse-link-disabled-bg: transparent ;
|
||||
|
||||
// Inverted navbar brand label
|
||||
// $navbar-inverse-brand-color: $navbar-inverse-link-color ;
|
||||
// $navbar-inverse-brand-hover-color: #fff ;
|
||||
// $navbar-inverse-brand-hover-bg: transparent ;
|
||||
|
||||
// Inverted navbar search
|
||||
// Normal navbar needs no special styles or vars
|
||||
// $navbar-inverse-search-bg: lighten($navbar-inverse-bg, 25%) ;
|
||||
// $navbar-inverse-search-bg-focus: #fff ;
|
||||
// $navbar-inverse-search-border: $navbar-inverse-bg ;
|
||||
// $navbar-inverse-search-placeholder-color: #ccc ;
|
||||
|
||||
|
||||
// Pagination
|
||||
// -------------------------
|
||||
|
||||
// $pagination-bg: #fff ;
|
||||
// $pagination-border: #ddd ;
|
||||
// $pagination-active-bg: #f5f5f5 ;
|
||||
|
||||
|
||||
// Jumbotron
|
||||
// -------------------------
|
||||
|
||||
// $jumbotron-bg: $gray-lighter ;
|
||||
// $jumbotron-heading-color: inherit ;
|
||||
// $jumbotron-lead-color: inherit ;
|
||||
|
||||
|
||||
// Form states and alerts
|
||||
// -------------------------
|
||||
|
||||
// $state-warning-text: #c09853 ;
|
||||
// $state-warning-bg: #fcf8e3 ;
|
||||
// $state-warning-border: darken(adjust-hue($state-warning-bg, -10), 3%) ;
|
||||
|
||||
// $state-danger-text: #b94a48 ;
|
||||
// $state-danger-bg: #f2dede ;
|
||||
// $state-danger-border: darken(adjust-hue($state-danger-bg, -10), 3%) ;
|
||||
|
||||
// $state-success-text: #468847 ;
|
||||
// $state-success-bg: #dff0d8 ;
|
||||
// $state-success-border: darken(adjust-hue($state-success-bg, -10), 5%) ;
|
||||
|
||||
// $state-info-text: #3a87ad ;
|
||||
// $state-info-bg: #d9edf7 ;
|
||||
// $state-info-border: darken(adjust-hue($state-info-bg, -10), 7%) ;
|
||||
|
||||
|
||||
// Tooltips and popovers
|
||||
// -------------------------
|
||||
// $tooltip-color: #fff ;
|
||||
// $tooltip-bg: rgba(0,0,0,.9) ;
|
||||
// $tooltip-arrow-width: 5px ;
|
||||
// $tooltip-arrow-color: $tooltip-bg ;
|
||||
|
||||
// $popover-bg: #fff ;
|
||||
// $popover-arrow-width: 10px ;
|
||||
// $popover-arrow-color: #fff ;
|
||||
// $popover-title-bg: darken($popover-bg, 3%) ;
|
||||
|
||||
// Special enhancement for popovers
|
||||
// $popover-arrow-outer-width: ($popover-arrow-width + 1) ;
|
||||
// $popover-arrow-outer-color: rgba(0,0,0,.25) ;
|
||||
|
||||
|
||||
// Labels
|
||||
// -------------------------
|
||||
// $label-success-bg: $brand-success ;
|
||||
// $label-info-bg: $brand-info ;
|
||||
// $label-warning-bg: $brand-warning ;
|
||||
// $label-danger-bg: $brand-danger ;
|
||||
|
||||
|
||||
// Modals
|
||||
// -------------------------
|
||||
// $modal-inner-padding: 20px ;
|
||||
|
||||
// $modal-title-padding: 15px ;
|
||||
// $modal-title-line-height: $line-height-base ;
|
||||
|
||||
// Alerts
|
||||
// -------------------------
|
||||
// $alert-bg: $state-warning-bg ;
|
||||
// $alert-text: $state-warning-text ;
|
||||
// $alert-border: $state-warning-border ;
|
||||
// $alert-border-radius: $border-radius-base ;
|
||||
|
||||
// $alert-success-bg: $state-success-bg ;
|
||||
// $alert-success-text: $state-success-text ;
|
||||
// $alert-success-border: $state-success-border ;
|
||||
|
||||
// $alert-danger-bg: $state-danger-bg ;
|
||||
// $alert-danger-text: $state-danger-text ;
|
||||
// $alert-danger-border: $state-danger-border ;
|
||||
|
||||
// $alert-info-bg: $state-info-bg ;
|
||||
// $alert-info-text: $state-info-text ;
|
||||
// $alert-info-border: $state-info-border ;
|
||||
|
||||
|
||||
// Progress bars
|
||||
// -------------------------
|
||||
// $progress-bg: #f5f5f5 ;
|
||||
// $progress-bar-bg: $brand-primary ;
|
||||
// $progress-bar-success-bg: $brand-success ;
|
||||
// $progress-bar-warning-bg: $brand-warning ;
|
||||
// $progress-bar-danger-bg: $brand-danger ;
|
||||
// $progress-bar-info-bg: $brand-info ;
|
||||
|
||||
|
||||
// List group
|
||||
// -------------------------
|
||||
// $list-group-bg: #fff ;
|
||||
// $list-group-border: #ddd ;
|
||||
// $list-group-border-radius: $border-radius-base ;
|
||||
|
||||
// $list-group-hover-bg: #f5f5f5 ;
|
||||
// $list-group-active-color: #fff ;
|
||||
// $list-group-active-bg: $component-active-bg ;
|
||||
// $list-group-active-border: $list-group-active-bg ;
|
||||
|
||||
// Panels
|
||||
// -------------------------
|
||||
// $panel-bg: #fff ;
|
||||
// $panel-border: #ddd ;
|
||||
// $panel-border-radius: $border-radius-base ;
|
||||
// $panel-heading-bg: #f5f5f5 ;
|
||||
// $panel-footer-bg: #f5f5f5 ;
|
||||
|
||||
// $panel-primary-text: #fff ;
|
||||
// $panel-primary-border: $brand-primary ;
|
||||
// $panel-primary-heading-bg: $brand-primary ;
|
||||
|
||||
// $panel-success-text: $state-success-text ;
|
||||
// $panel-success-border: $state-success-border ;
|
||||
// $panel-success-heading-bg: $state-success-bg ;
|
||||
|
||||
// $panel-warning-text: $state-warning-text ;
|
||||
// $panel-warning-border: $state-warning-border ;
|
||||
// $panel-warning-heading-bg: $state-warning-bg ;
|
||||
|
||||
// $panel-danger-text: $state-danger-text ;
|
||||
// $panel-danger-border: $state-danger-border ;
|
||||
// $panel-danger-heading-bg: $state-danger-bg ;
|
||||
|
||||
// $panel-info-text: $state-info-text ;
|
||||
// $panel-info-border: $state-info-border ;
|
||||
// $panel-info-heading-bg: $state-info-bg ;
|
||||
|
||||
|
||||
// Thumbnails
|
||||
// -------------------------
|
||||
// $thumbnail-caption-color: $text-color ;
|
||||
// $thumbnail-bg: $body-bg ;
|
||||
// $thumbnail-border: #ddd ;
|
||||
// $thumbnail-border-radius: $border-radius-base ;
|
||||
|
||||
|
||||
// Wells
|
||||
// -------------------------
|
||||
// $well-bg: #f5f5f5 ;
|
||||
|
||||
|
||||
// Miscellaneous
|
||||
// -------------------------
|
||||
|
||||
// Hr border color
|
||||
// $hr-border: $gray-lighter ;
|
||||
|
||||
// Horizontal forms & lists
|
||||
// $component-offset-horizontal: 180px ;
|
||||
|
||||
|
||||
// Media queries breakpoints
|
||||
// --------------------------------------------------
|
||||
|
||||
// Tiny screen / phone
|
||||
// $screen-tiny: 480px ;
|
||||
// $screen-phone: $screen-tiny ;
|
||||
|
||||
// Small screen / tablet
|
||||
// $screen-small: 768px ;
|
||||
// $screen-tablet: $screen-small ;
|
||||
|
||||
// Medium screen / desktop
|
||||
// $screen-medium: 992px ;
|
||||
// $screen-desktop: $screen-medium ;
|
||||
|
||||
// So media queries don't overlap when required, provide a maximum
|
||||
// $screen-small-max: ($screen-medium - 1) ;
|
||||
// $screen-tablet-max: $screen-small-max ;
|
||||
|
||||
// Large screen / wide desktop
|
||||
// $screen-large: 1200px ;
|
||||
// $screen-large-desktop: $screen-large ;
|
||||
|
||||
|
||||
// Container sizes
|
||||
// --------------------------------------------------
|
||||
|
||||
// Small screen / tablet
|
||||
// $container-tablet: 728px ;
|
||||
|
||||
// Medium screen / desktop
|
||||
// $container-desktop: 940px ;
|
||||
|
||||
// Large screen / wide desktop
|
||||
// $container-large-desktop: 1170px ;
|
||||
|
||||
|
||||
// Grid system
|
||||
// --------------------------------------------------
|
||||
|
||||
// Point at which the navbar stops collapsing
|
||||
// $grid-float-breakpoint: $screen-tablet ;
|
||||
@@ -34,11 +34,10 @@
|
||||
{if $shared_category}
|
||||
<p class="alert alert-block">{l s='If you delete this picture, it will be deleted in all of your shared shops!'}</p>
|
||||
{/if}
|
||||
<br>
|
||||
<a href="{$current}&{$identifier}={$form_id}&token={$token}&{if $shared_category}forcedeleteImage=1{else}deleteImage=1{/if}">
|
||||
<img src="../img/admin/delete.gif" alt="{l s='Delete'}" /> {l s='Delete'}
|
||||
</a>
|
||||
</div><br />
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
<input type="file" name="{$input.name}" {if isset($input.id)}id="{$input.id}"{/if} />
|
||||
|
||||
+7
-6
@@ -26,22 +26,23 @@
|
||||
{extends file="helpers/list/list_header.tpl"}
|
||||
|
||||
{block name=leadin}
|
||||
<div class="cat_bar2">
|
||||
<ul class="breadcrumb cat_bar2">
|
||||
{assign var=i value=0}
|
||||
{foreach $categories_tree key=key item=category}
|
||||
{if $i++ == 0}
|
||||
<img src="../img/admin/home.gif" alt="" />
|
||||
<li><i class="icon-home"></i>
|
||||
{assign var=params_url value=""}
|
||||
{else}
|
||||
{assign var=params_url value="&id_category={$category.id_category}&viewcategory"}
|
||||
<li>{assign var=params_url value="&id_category={$category.id_category}&viewcategory"}
|
||||
{/if}
|
||||
{if $category.id_category == $categories_tree_current_id}
|
||||
{$category.name}
|
||||
{$category.name}</li>
|
||||
{else}
|
||||
<a href="{$currentIndex}{$params_url}&token={$token}">{$category.name}</a> >
|
||||
<a href="{$currentIndex}{$params_url}&token={$token}">{$category.name}</a></li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
{if isset($delete_category) && $delete_category}
|
||||
<form action="{$REQUEST_URI}" method="post">
|
||||
<div class="alert alert-block">
|
||||
|
||||
@@ -34,27 +34,29 @@
|
||||
{l s='Filename:'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-7 translatable">
|
||||
{foreach $languages as $language}
|
||||
<div class="lang_{$language.id_lang}" style="{if $language.id_lang != $default_form_language}display:none;{/if}">
|
||||
<input type="text" name="attachment_name_{$language.id_lang}" value="{$attachment_name[$language.id_lang]|escape:'htmlall':'UTF-8'}" />
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="col-lg-7">
|
||||
<div class="row">
|
||||
{include file="controllers/products/input_text_lang.tpl"
|
||||
languages=$languages
|
||||
input_value=$attachment_name
|
||||
input_name="attachment_name"
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-3">{l s='Description:'} </label>
|
||||
<div class="col-lg-7 translatable">
|
||||
{foreach $languages as $language}
|
||||
<div class="lang_{$language.id_lang}" style="display: {if $language.id_lang == $default_form_language}block{else}none{/if};">
|
||||
<textarea name="attachment_description_{$language.id_lang}">{$attachment_description[$language.id_lang]|escape:'htmlall':'UTF-8'}</textarea>
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="col-lg-9">
|
||||
{include
|
||||
file="controllers/products/textarea_lang.tpl"
|
||||
languages=$languages
|
||||
input_name="attachment_description"
|
||||
input_value=$attachment_description
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
@@ -62,45 +64,73 @@
|
||||
{l s='File:'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="input-group col-lg-7">
|
||||
<input type="file" name="attachment_file" />
|
||||
<input type="submit" value="{l s='Upload attachment file'}" name="submitAddAttachments" class="btn btn-default" />
|
||||
<div class="col-lg-7">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<input id="attachement_file" type="file" name="attachment_file" class="hide" />
|
||||
<div class="dummyfile input-group">
|
||||
<span class="input-group-addon"><i class="icon-file"></i></span>
|
||||
<input id="attachement_filename" type="text" class="disabled" name="filename" readonly />
|
||||
<span class="input-group-btn">
|
||||
<button id="attachement_fileselectbutton" type="button" name="submitAddAttachments" class="btn btn-default">
|
||||
{l s='Choose a file'}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<button type="submit" name="submitAddAttachments" class="btn btn-default">
|
||||
<i class="icon-cloud-upload"></i> {l s='Upload attachment file'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('#attachement_fileselectbutton').click(function(e){
|
||||
$('#attachement_file').trigger('click');
|
||||
});
|
||||
$('#attachement_file').change(function(e){
|
||||
var val = $(this).val();
|
||||
var file = val.split(/[\\/]/);
|
||||
$('#attachement_filename').val(file[file.length-1]);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-9 col-offset-3">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<p>{l s='Available attachments:'}</p>
|
||||
<select multiple id="selectAttachment2">
|
||||
{foreach $attach2 as $attach}
|
||||
<option value="{$attach.id_attachment}">{$attach.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<a href="#" id="addAttachment" class="btn btn-default btn-block">{l s='Add'} <i class="icon-arrow-right"></i></a>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<p>{l s='Attachments for this product:'}</p>
|
||||
<select multiple id="selectAttachment1" name="attachments[]">
|
||||
{foreach $attach1 as $attach}
|
||||
<option value="{$attach.id_attachment}">{$attach.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<a href="#" id="removeAttachment" class="btn btn-default btn-block"><i class="icon-arrow-left"></i> {l s='Remove'}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="arrayAttachments" id="arrayAttachments" value="{foreach $attach1 as $attach}{$attach.id_attachment},{/foreach}" />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<p>{l s='Available attachments:'}</p>
|
||||
<select multiple id="selectAttachment2" style="width:300px;height:160px;">
|
||||
{foreach $attach2 as $attach}
|
||||
<option value="{$attach.id_attachment}">{$attach.name}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a href="#" id="addAttachment" style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px">
|
||||
{l s='Add'} >>
|
||||
</a>
|
||||
</td>
|
||||
<td style="padding-left:20px;">
|
||||
<p>{l s='Attachments for this product:'}</p>
|
||||
<select multiple id="selectAttachment1" name="attachments[]" style="width:300px;height:160px;">
|
||||
{foreach $attach1 as $attach}
|
||||
<option value="{$attach.id_attachment}">{$attach.name}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a href="#" id="removeAttachment" style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px">
|
||||
<< {l s='Remove'}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="clear"> </div>
|
||||
<input type="hidden" name="arrayAttachments" id="arrayAttachments" value="{foreach $attach1 as $attach}{$attach.id_attachment},{/foreach}" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var iso = '{$iso_tiny_mce}';
|
||||
var pathCSS = '{$smarty.const._THEME_CSS_DIR_}';
|
||||
var ad = '{$ad}';
|
||||
</script>
|
||||
{/if}
|
||||
<script type="text/javascript">
|
||||
var iso = '{$iso_tiny_mce}';
|
||||
var pathCSS = '{$smarty.const._THEME_CSS_DIR_}';
|
||||
var ad = '{$ad}';
|
||||
</script>
|
||||
{/if}
|
||||
@@ -32,18 +32,18 @@
|
||||
{l s='You can either create a specific value, or select among the existing pre-defined values you\'ve previously added.'}
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Feature'}</th>
|
||||
<th>{l s='Pre-defined value'}</th>
|
||||
<th>{l s='or'} {l s='Customized value'}</th>
|
||||
<th><u>{l s='or'}</u> {l s='Customized value'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
{foreach from=$available_features item=available_feature}
|
||||
<tbody>
|
||||
{foreach from=$available_features item=available_feature}
|
||||
|
||||
<tr>
|
||||
<td>{$available_feature.name}</td>
|
||||
<td>
|
||||
@@ -59,23 +59,47 @@
|
||||
</select>
|
||||
{else}
|
||||
<input type="hidden" name="feature_{$available_feature.id_feature}_value" value="0" />
|
||||
<span>{l s='N/A'} -
|
||||
<span>{l s='N/A'} -
|
||||
<a href="{$link->getAdminLink('AdminFeatures')|escape:'htmlall':'UTF-8'}&addfeature_value&id_feature={$available_feature.id_feature}"
|
||||
class="confirm_leave button"><i class="icon-plus-sign"></i> {l s='Add pre-defined values first'}</a>
|
||||
class="confirm_leave btn btn-link btn-small"><i class="icon-plus-sign"></i> {l s='Add pre-defined values first'} <i class="icon-external-link-sign"></i></a>
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="translatable">
|
||||
{foreach from=$languages key=k item=language}
|
||||
<div class="lang_{$language.id_lang}" style="{if $language.id_lang != $default_form_language}display:none;{/if}float: left;">
|
||||
<textarea class="custom_{$available_feature.id_feature}_" name="custom_{$available_feature.id_feature}_{$language.id_lang}" cols="40" rows="1"
|
||||
onkeyup="if (isArrowKey(event)) return ;$('#feature_{$available_feature.id_feature}_value').val(0);" >{$available_feature.val[$k].value|escape:'htmlall':'UTF-8'|default:""}</textarea>
|
||||
<td>
|
||||
{foreach from=$languages key=k item=language}
|
||||
<div class="row translatable-field lang-{$language.id_lang}">
|
||||
<div class="col-lg-9">
|
||||
<textarea
|
||||
class="custom_{$available_feature.id_feature}_{$language.id_lang}"
|
||||
name="custom_{$available_feature.id_feature}_{$language.id_lang}"
|
||||
cols="40"
|
||||
rows="1"
|
||||
onkeyup="if (isArrowKey(event)) return ;$('#feature_{$available_feature.id_feature}_value').val(0);" >{$available_feature.val[$k].value|escape:'htmlall':'UTF-8'|default:""}</textarea>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<img src="{$base_url}/img/l/{$language.id_lang|intval}.jpg" alt="">
|
||||
{$language.iso_code}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach from=$languages item=language}
|
||||
<li>
|
||||
<a href="javascript:hideOtherLanguage({$language.id_lang});">
|
||||
<img src="{$base_url}/img/l/{$language.id_lang|intval}.jpg" alt=""> {$language.iso_code}</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{foreachelse}
|
||||
<tr><td colspan="3" style="text-align:center;"><i class="icon-warning-sign"></i> {l s='No features have been defined'}</td></tr>
|
||||
<tr>
|
||||
<td colspan="3" style="text-align:center;"><i class="icon-warning-sign"></i> {l s='No features have been defined'}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -54,21 +54,16 @@
|
||||
|
||||
</script>
|
||||
<div class="bloc-leadin">
|
||||
|
||||
<div id="container_category_tree">
|
||||
|
||||
<a href="#" id="toggle_category_tree">
|
||||
<form>
|
||||
<input type="checkbox" {if $is_category_filter}checked="checked"{/if} />{l s='Filter by category'}
|
||||
</form>
|
||||
</a>
|
||||
|
||||
<div id="block_category_tree" {if !$is_category_filter}style="display:none"{/if}>
|
||||
{$category_tree}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
@@ -24,317 +24,308 @@
|
||||
*}
|
||||
|
||||
{if isset($id_product) && isset($product)}
|
||||
<input type="hidden" name="submitted_tabs[]" value="Images" />
|
||||
<input type="hidden" name="submitted_tabs[]" value="Images" />
|
||||
|
||||
<legend class="tab" >
|
||||
{l s='Images'}
|
||||
<span class="badge" id="countImage">{$countImages}</span>
|
||||
</legend>
|
||||
<legend class="tab" >
|
||||
{l s='Images'}
|
||||
<span class="badge" id="countImage">{$countImages}</span>
|
||||
</legend>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-3 file_upload_label">
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
title="{l s='Format:'} JPG, GIF, PNG. {l s='Filesize:'} {$max_image_size|string_format:"%.2f"} {l s='MB max.'}">
|
||||
{if isset($id_image)}{l s='Edit this product image'}{else}{l s='Add a new image to this product'}{/if}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-5">
|
||||
{l s='File:'}
|
||||
<div id="file-uploader">
|
||||
<noscript>
|
||||
<p>{l s='Please enable JavaScript to use file uploader:'}</p>
|
||||
</noscript>
|
||||
</div>
|
||||
<div id="progressBarImage" class="progressBarImage"></div>
|
||||
<div id="showCounter" style="display:none;">
|
||||
<span id="imageUpload">0</span><span id="imageTotal">0</span>
|
||||
</div>
|
||||
<input type="hidden" name="resizer" value="auto" />
|
||||
{if Tools::getValue('id_image')}
|
||||
<input type="hidden" name="id_image" value="{Tools::getValue('id_image')|intval}" />
|
||||
{/if}
|
||||
<div class="row panel">
|
||||
<label class="control-label col-lg-5 file_upload_label">
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
title="{l s='Format:'} JPG, GIF, PNG. {l s='Filesize:'} {$max_image_size|string_format:"%.2f"} {l s='MB max.'}">
|
||||
{if isset($id_image)}{l s='Edit this product image'}{else}{l s='Add a new image to this product'}{/if}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-7">
|
||||
{l s='File:'}
|
||||
<div id="file-uploader">
|
||||
<noscript>
|
||||
<p>{l s='Please enable JavaScript to use file uploader:'}</p>
|
||||
</noscript>
|
||||
</div>
|
||||
<div id="progressBarImage" class="progressBarImage"></div>
|
||||
<div id="showCounter" style="display:none;">
|
||||
<span id="imageUpload">0</span><span id="imageTotal">0</span>
|
||||
</div>
|
||||
<input type="hidden" name="resizer" value="auto" />
|
||||
{if Tools::getValue('id_image')}
|
||||
<input type="hidden" name="id_image" value="{Tools::getValue('id_image')|intval}" />
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table class="table tableDnD" id="imageTable">
|
||||
<thead>
|
||||
<tr class="nodrag nodrop">
|
||||
<th>{l s='Image'}</th>
|
||||
<th>{l s='Position'}</th>
|
||||
{if $shops}
|
||||
{foreach from=$shops item=shop}
|
||||
<th>{$shop.name}</th>
|
||||
{/foreach}
|
||||
{/if}
|
||||
<th>{l s='Cover'}</th>
|
||||
<th>{l s='Action'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="imageList">
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<table class="table tableDnD" id="imageTable">
|
||||
<thead>
|
||||
<tr class="nodrag nodrop">
|
||||
<th>{l s='Image'}</th>
|
||||
<th>{l s='Position'}</th>
|
||||
{if $shops}
|
||||
{foreach from=$shops item=shop}
|
||||
<th>{$shop.name}</th>
|
||||
{/foreach}
|
||||
{/if}
|
||||
<th>{l s='Cover'}</th>
|
||||
<th>{l s='Action'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="imageList">
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<table id="lineType" style="display:none;">
|
||||
<tr id="image_id">
|
||||
<td style="padding: 4px;">
|
||||
<a href="{$smarty.const._THEME_PROD_DIR_}image_path.jpg" class="fancybox">
|
||||
<img src="{$smarty.const._THEME_PROD_DIR_}en-default-small_default.jpg" alt="image_id" title="image_id" />
|
||||
</a>
|
||||
</td>
|
||||
<td id="td_image_id" class="pointer dragHandle center positionImage">
|
||||
image_position
|
||||
<table id="lineType" style="display:none;">
|
||||
<tr id="image_id">
|
||||
<td style="padding: 4px;">
|
||||
<a href="{$smarty.const._THEME_PROD_DIR_}image_path.jpg" class="fancybox">
|
||||
<img src="{$smarty.const._THEME_PROD_DIR_}en-default-small_default.jpg" alt="image_id" title="image_id" />
|
||||
</a>
|
||||
</td>
|
||||
<td id="td_image_id" class="pointer dragHandle center positionImage">
|
||||
image_position
|
||||
</td>
|
||||
{if $shops}
|
||||
{foreach from=$shops item=shop}
|
||||
<td class="center">
|
||||
<input type="checkbox" class="image_shop" name="id_image" id="{$shop.id_shop}image_id" value="{$shop.id_shop}" />
|
||||
</td>
|
||||
{/foreach}
|
||||
{/if}
|
||||
<td class="center cover"><a href="#">
|
||||
<i class="covered icon-check-empty"></i>
|
||||
</td>
|
||||
<td class="center">
|
||||
<a href="#" class="btn btn-default delete_product_image" >
|
||||
<i class="icon-trash"></i> {l s='Delete this image'}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
var upbutton = '{l s='Upload an image'}';
|
||||
var token = '{$token}';
|
||||
var come_from = '{$table}';
|
||||
var success_add = '{l s='The image has been successfully added.'}';
|
||||
var id_tmp = 0;
|
||||
var current_shop_id = {$current_shop_id|intval};
|
||||
{literal}
|
||||
//Ready Function
|
||||
$(document).ready(function(){
|
||||
{/literal}
|
||||
{foreach from=$images item=image}
|
||||
assoc = {literal}"{"{/literal};
|
||||
{if $shops}
|
||||
{foreach from=$shops item=shop}
|
||||
<td class="center">
|
||||
<input type="checkbox" class="image_shop" name="id_image" id="{$shop.id_shop}image_id" value="{$shop.id_shop}" />
|
||||
</td>
|
||||
assoc += '"{$shop.id_shop}" : {if $image->isAssociatedToShop($shop.id_shop)}1{else}0{/if},';
|
||||
{/foreach}
|
||||
{/if}
|
||||
<td class="center cover"><a href="#">
|
||||
<i class="covered icon-check-empty"></i>
|
||||
</td>
|
||||
<td class="center">
|
||||
<a href="#" class="btn btn-default delete_product_image" >
|
||||
<i class="icon-trash"></i> {l s='Delete this image'}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
var upbutton = '{l s='Upload an image'}';
|
||||
var token = '{$token}';
|
||||
var come_from = '{$table}';
|
||||
var success_add = '{l s='The image has been successfully added.'}';
|
||||
var id_tmp = 0;
|
||||
var current_shop_id = {$current_shop_id|intval};
|
||||
{literal}
|
||||
//Ready Function
|
||||
$(document).ready(function(){
|
||||
{/literal}
|
||||
{foreach from=$images item=image}
|
||||
assoc = {literal}"{"{/literal};
|
||||
{if $shops}
|
||||
{foreach from=$shops item=shop}
|
||||
assoc += '"{$shop.id_shop}" : {if $image->isAssociatedToShop($shop.id_shop)}1{else}0{/if},';
|
||||
{/foreach}
|
||||
{/if}
|
||||
if (assoc != {literal}"{"{/literal})
|
||||
{
|
||||
assoc = assoc.slice(0, -1);
|
||||
assoc += {literal}"}"{/literal};
|
||||
assoc = jQuery.parseJSON(assoc);
|
||||
}
|
||||
else
|
||||
assoc = false;
|
||||
imageLine({$image->id}, "{$image->getExistingImgPath()}", {$image->position}, "{if $image->cover}icon-check-sign{else}icon-check-empty{/if}", assoc);
|
||||
{/foreach}
|
||||
{literal}
|
||||
$("#imageTable").tableDnD(
|
||||
if (assoc != {literal}"{"{/literal})
|
||||
{
|
||||
onDrop: function(table, row) {
|
||||
current = $(row).attr("id");
|
||||
stop = false;
|
||||
image_up = "{";
|
||||
$("#imageList").find("tr").each(function(i) {
|
||||
$("#td_" + $(this).attr("id")).html(i + 1);
|
||||
if (!stop || (i + 1) == 2)
|
||||
image_up += '"' + $(this).attr("id") + '" : ' + (i + 1) + ',';
|
||||
});
|
||||
image_up = image_up.slice(0, -1);
|
||||
image_up += "}";
|
||||
updateImagePosition(image_up);
|
||||
}
|
||||
});
|
||||
var filecheck = 1;
|
||||
var uploader = new qq.FileUploader(
|
||||
{
|
||||
element: document.getElementById("file-uploader"),
|
||||
action: "ajax-tab.php",
|
||||
debug: false,
|
||||
params: {
|
||||
id_product : {/literal}{$id_product}{literal},
|
||||
id_category : {/literal}{$id_category_default}{literal},
|
||||
token : "{/literal}{$token}{literal}",
|
||||
tab : "AdminProducts",
|
||||
action : 'addImage',
|
||||
ajax: 1
|
||||
},
|
||||
onComplete: function(id, fileName, responseJSON)
|
||||
{
|
||||
var percent = ((filecheck * 100) / nbfile);
|
||||
$("#progressBarImage").progressbar({value: percent});
|
||||
if (percent != 100)
|
||||
{
|
||||
$("#imageUpload").html(parseInt(filecheck));
|
||||
$("#imageTotal").html(" / " + parseInt(nbfile) + " {/literal}{l s='Images'}{literal}");
|
||||
$("#progressBarImage").show();
|
||||
$("#showCounter").show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#progressBarImage").progressbar({value: 0});
|
||||
$("#progressBarImage").hide();
|
||||
$("#showCounter").hide();
|
||||
nbfile = 0;
|
||||
filecheck = 0;
|
||||
}
|
||||
if (responseJSON.status == 'ok')
|
||||
{
|
||||
cover = "icon-check-empty";
|
||||
if (responseJSON.cover == "1")
|
||||
cover = "icon-check-sign";
|
||||
imageLine(responseJSON.id, responseJSON.path, responseJSON.position, cover, responseJSON.shops)
|
||||
$("#imageTable tr:last").after(responseJSON.html);
|
||||
$("#countImage").html(parseInt($("#countImage").html()) + 1);
|
||||
$("#img" + id).remove();
|
||||
$("#imageTable").tableDnDUpdate();
|
||||
showSuccessMessage(responseJSON.name + " " + success_add);
|
||||
}
|
||||
else
|
||||
showErrorMessage(responseJSON.error);
|
||||
filecheck++;
|
||||
},
|
||||
onSubmit: function(id, filename)
|
||||
{
|
||||
$("#imageTable").show();
|
||||
$("#listImage").append("<li id='img"+id+"'><div class=\"float\" >" + filename + "</div></div><a style=\"margin-left:10px\"href=\"javascript:delQueue(" + id +");\"><img src=\"../img/admin/disabled.gif\" alt=\"\" border=\"0\"></a><p class=\"errorImg\"></p></li>");
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* on success function
|
||||
*/
|
||||
function afterDeleteProductImage(data)
|
||||
{
|
||||
data = $.parseJSON(data);
|
||||
if (data)
|
||||
{
|
||||
cover = 0;
|
||||
id = data.content.id;
|
||||
if (data.status == 'ok')
|
||||
{
|
||||
if ($("#" + id + ' .covered').hasClass('icon-check-sign'))
|
||||
cover = 1;
|
||||
$("#" + id).remove();
|
||||
}
|
||||
if (cover)
|
||||
$("#imageTable tr").eq(1).find(".covered").addClass('icon-check-sign');
|
||||
$("#countImage").html(parseInt($("#countImage").html()) - 1);
|
||||
refreshImagePositions($("#imageTable"));
|
||||
showSuccessMessage(data.confirmations);
|
||||
}
|
||||
assoc = assoc.slice(0, -1);
|
||||
assoc += {literal}"}"{/literal};
|
||||
assoc = jQuery.parseJSON(assoc);
|
||||
}
|
||||
|
||||
$('.delete_product_image').die().live('click', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
id = $(this).parent().parent().attr('id');
|
||||
if (confirm("{/literal}{l s='Are you sure?' js=1}{literal}"))
|
||||
doAdminAjax({
|
||||
"action":"deleteProductImage",
|
||||
"id_image":id,
|
||||
"id_product" : {/literal}{$id_product}{literal},
|
||||
"id_category" : {/literal}{$id_category_default}{literal},
|
||||
"token" : "{/literal}{$token}{literal}",
|
||||
"tab" : "AdminProducts",
|
||||
"ajax" : 1 }, afterDeleteProductImage
|
||||
);
|
||||
else
|
||||
assoc = false;
|
||||
imageLine({$image->id}, "{$image->getExistingImgPath()}", {$image->position}, "{if $image->cover}icon-check-sign{else}icon-check-empty{/if}", assoc);
|
||||
{/foreach}
|
||||
{literal}
|
||||
$("#imageTable").tableDnD(
|
||||
{
|
||||
onDrop: function(table, row) {
|
||||
current = $(row).attr("id");
|
||||
stop = false;
|
||||
image_up = "{";
|
||||
$("#imageList").find("tr").each(function(i) {
|
||||
$("#td_" + $(this).attr("id")).html(i + 1);
|
||||
if (!stop || (i + 1) == 2)
|
||||
image_up += '"' + $(this).attr("id") + '" : ' + (i + 1) + ',';
|
||||
});
|
||||
|
||||
$('.covered').die().live('click', function(e)
|
||||
image_up = image_up.slice(0, -1);
|
||||
image_up += "}";
|
||||
updateImagePosition(image_up);
|
||||
}
|
||||
});
|
||||
var filecheck = 1;
|
||||
var uploader = new qq.FileUploader(
|
||||
{
|
||||
element: document.getElementById("file-uploader"),
|
||||
action: "ajax-tab.php",
|
||||
debug: false,
|
||||
params: {
|
||||
id_product : {/literal}{$id_product}{literal},
|
||||
id_category : {/literal}{$id_category_default}{literal},
|
||||
token : "{/literal}{$token}{literal}",
|
||||
tab : "AdminProducts",
|
||||
action : 'addImage',
|
||||
ajax: 1
|
||||
},
|
||||
onComplete: function(id, fileName, responseJSON)
|
||||
{
|
||||
e.preventDefault();
|
||||
id = $(this).parent().parent().parent().attr('id');
|
||||
$("#imageList .cover i").each( function(i){
|
||||
$(this).removeClass('icon-check-sign').addClass('icon-check-empty');
|
||||
});
|
||||
$(this).removeClass('icon-check-empty').addClass('icon-check-sign');
|
||||
|
||||
if (current_shop_id != 0)
|
||||
$('#' + current_shop_id + id).attr('check', true);
|
||||
var percent = ((filecheck * 100) / nbfile);
|
||||
$("#progressBarImage").progressbar({value: percent});
|
||||
if (percent != 100)
|
||||
{
|
||||
$("#imageUpload").html(parseInt(filecheck));
|
||||
$("#imageTotal").html(" / " + parseInt(nbfile) + " {/literal}{l s='Images'}{literal}");
|
||||
$("#progressBarImage").show();
|
||||
$("#showCounter").show();
|
||||
}
|
||||
else
|
||||
$(this).parent().parent().parent().children('td input').attr('check', true);
|
||||
doAdminAjax({
|
||||
"action":"UpdateCover",
|
||||
{
|
||||
$("#progressBarImage").progressbar({value: 0});
|
||||
$("#progressBarImage").hide();
|
||||
$("#showCounter").hide();
|
||||
nbfile = 0;
|
||||
filecheck = 0;
|
||||
}
|
||||
if (responseJSON.status == 'ok')
|
||||
{
|
||||
cover = "icon-check-empty";
|
||||
if (responseJSON.cover == "1")
|
||||
cover = "icon-check-sign";
|
||||
imageLine(responseJSON.id, responseJSON.path, responseJSON.position, cover, responseJSON.shops)
|
||||
$("#imageTable tr:last").after(responseJSON.html);
|
||||
$("#countImage").html(parseInt($("#countImage").html()) + 1);
|
||||
$("#img" + id).remove();
|
||||
$("#imageTable").tableDnDUpdate();
|
||||
showSuccessMessage(responseJSON.name + " " + success_add);
|
||||
}
|
||||
else
|
||||
showErrorMessage(responseJSON.error);
|
||||
filecheck++;
|
||||
},
|
||||
onSubmit: function(id, filename)
|
||||
{
|
||||
$("#imageTable").show();
|
||||
$("#listImage").append("<li id='img"+id+"'><div class=\"float\" >" + filename + "</div></div><a style=\"margin-left:10px\"href=\"javascript:delQueue(" + id +");\"><img src=\"../img/admin/disabled.gif\" alt=\"\" border=\"0\"></a><p class=\"errorImg\"></p></li>");
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* on success function
|
||||
*/
|
||||
function afterDeleteProductImage(data)
|
||||
{
|
||||
data = $.parseJSON(data);
|
||||
if (data)
|
||||
{
|
||||
cover = 0;
|
||||
id = data.content.id;
|
||||
if (data.status == 'ok')
|
||||
{
|
||||
if ($("#" + id + ' .covered').hasClass('icon-check-sign'))
|
||||
cover = 1;
|
||||
$("#" + id).remove();
|
||||
}
|
||||
if (cover)
|
||||
$("#imageTable tr").eq(1).find(".covered").addClass('icon-check-sign');
|
||||
$("#countImage").html(parseInt($("#countImage").html()) - 1);
|
||||
refreshImagePositions($("#imageTable"));
|
||||
showSuccessMessage(data.confirmations);
|
||||
}
|
||||
}
|
||||
|
||||
$('.delete_product_image').die().live('click', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
id = $(this).parent().parent().attr('id');
|
||||
if (confirm("{/literal}{l s='Are you sure?' js=1}{literal}"))
|
||||
doAdminAjax({
|
||||
"action":"deleteProductImage",
|
||||
"id_image":id,
|
||||
"id_product" : {/literal}{$id_product}{literal},
|
||||
"token" : "{/literal}{$token}{literal}",
|
||||
"controller" : "AdminProducts",
|
||||
"ajax" : 1 }
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
$('.image_shop').die().live('click', function()
|
||||
{
|
||||
active = false;
|
||||
if ($(this).attr("checked"))
|
||||
active = true;
|
||||
id = $(this).parent().parent().attr('id');
|
||||
id_shop = $(this).attr("id").replace(id, "");
|
||||
doAdminAjax(
|
||||
{
|
||||
"action":"UpdateProductImageShopAsso",
|
||||
"id_image":id,
|
||||
"id_product":id_product,
|
||||
"id_shop": id_shop,
|
||||
"active":active,
|
||||
"id_category" : {/literal}{$id_category_default}{literal},
|
||||
"token" : "{/literal}{$token}{literal}",
|
||||
"tab" : "AdminProducts",
|
||||
"ajax" : 1
|
||||
});
|
||||
});
|
||||
|
||||
//function
|
||||
function updateImagePosition(json)
|
||||
{
|
||||
doAdminAjax(
|
||||
{
|
||||
"action":"updateImagePosition",
|
||||
"json":json,
|
||||
"token" : "{/literal}{$token}{literal}",
|
||||
"tab" : "AdminProducts",
|
||||
"ajax" : 1
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function delQueue(id)
|
||||
{
|
||||
$("#img" + id).fadeOut("slow");
|
||||
$("#img" + id).remove();
|
||||
}
|
||||
|
||||
function imageLine(id, path, position, cover, shops)
|
||||
{
|
||||
line = $("#lineType").html();
|
||||
line = line.replace(/image_id/g, id);
|
||||
line = line.replace(/en-default/g, path);
|
||||
line = line.replace(/image_path/g, path);
|
||||
line = line.replace(/image_position/g, position);
|
||||
line = line.replace(/icon-check-empty/g, cover);
|
||||
line = line.replace(/<tbody>/gi, "");
|
||||
line = line.replace(/<\/tbody>/gi, "");
|
||||
if (shops != false)
|
||||
{
|
||||
$.each(shops, function(key, value){
|
||||
if (value == 1)
|
||||
line = line.replace('id="' + key + '' + id + '"','id="' + key + '' + id + '" checked=checked');
|
||||
});
|
||||
}
|
||||
$("#imageList").append(line);
|
||||
}
|
||||
$('.fancybox').fancybox();
|
||||
"ajax" : 1 }, afterDeleteProductImage
|
||||
);
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
$('.covered').die().live('click', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
id = $(this).parent().parent().parent().attr('id');
|
||||
$("#imageList .cover i").each( function(i){
|
||||
$(this).removeClass('icon-check-sign').addClass('icon-check-empty');
|
||||
});
|
||||
$(this).removeClass('icon-check-empty').addClass('icon-check-sign');
|
||||
|
||||
if (current_shop_id != 0)
|
||||
$('#' + current_shop_id + id).attr('check', true);
|
||||
else
|
||||
$(this).parent().parent().parent().children('td input').attr('check', true);
|
||||
doAdminAjax({
|
||||
"action":"UpdateCover",
|
||||
"id_image":id,
|
||||
"id_product" : {/literal}{$id_product}{literal},
|
||||
"token" : "{/literal}{$token}{literal}",
|
||||
"controller" : "AdminProducts",
|
||||
"ajax" : 1 }
|
||||
);
|
||||
});
|
||||
|
||||
$('.image_shop').die().live('click', function()
|
||||
{
|
||||
active = false;
|
||||
if ($(this).attr("checked"))
|
||||
active = true;
|
||||
id = $(this).parent().parent().attr('id');
|
||||
id_shop = $(this).attr("id").replace(id, "");
|
||||
doAdminAjax(
|
||||
{
|
||||
"action":"UpdateProductImageShopAsso",
|
||||
"id_image":id,
|
||||
"id_product":id_product,
|
||||
"id_shop": id_shop,
|
||||
"active":active,
|
||||
"token" : "{/literal}{$token}{literal}",
|
||||
"tab" : "AdminProducts",
|
||||
"ajax" : 1
|
||||
});
|
||||
});
|
||||
|
||||
//function
|
||||
function updateImagePosition(json)
|
||||
{
|
||||
doAdminAjax(
|
||||
{
|
||||
"action":"updateImagePosition",
|
||||
"json":json,
|
||||
"token" : "{/literal}{$token}{literal}",
|
||||
"tab" : "AdminProducts",
|
||||
"ajax" : 1
|
||||
});
|
||||
}
|
||||
|
||||
function delQueue(id)
|
||||
{
|
||||
$("#img" + id).fadeOut("slow");
|
||||
$("#img" + id).remove();
|
||||
}
|
||||
|
||||
function imageLine(id, path, position, cover, shops)
|
||||
{
|
||||
line = $("#lineType").html();
|
||||
line = line.replace(/image_id/g, id);
|
||||
line = line.replace(/en-default/g, path);
|
||||
line = line.replace(/image_path/g, path);
|
||||
line = line.replace(/image_position/g, position);
|
||||
line = line.replace(/icon-check-empty/g, cover);
|
||||
line = line.replace(/<tbody>/gi, "");
|
||||
line = line.replace(/<\/tbody>/gi, "");
|
||||
if (shops != false)
|
||||
{
|
||||
$.each(shops, function(key, value){
|
||||
if (value == 1)
|
||||
line = line.replace('id="' + key + '' + id + '"','id="' + key + '' + id + '" checked=checked');
|
||||
});
|
||||
}
|
||||
$("#imageList").append(line);
|
||||
}
|
||||
$('.fancybox').fancybox();
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
@@ -219,9 +219,14 @@
|
||||
<div class="row redirect_product_options redirect_product_options_product_choise" style="display:none">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
|
||||
<label class="control-label col-lg-3">{l s='Related product:'}</label>
|
||||
<div class="col-lg-5">
|
||||
<div class="col-lg-7">
|
||||
<input type="hidden" value="" name="id_product_redirected" />
|
||||
<input type="text" id="related_product_autocomplete_input" autocomplete="off" class="ac_input" />
|
||||
|
||||
<div class="input-group">
|
||||
<input type="text" id="related_product_autocomplete_input" autocomplete="off" class="ac_input" />
|
||||
<span class="input-group-addon"><i class="icon-search"></i></span>
|
||||
</div>
|
||||
|
||||
<span id="related_product_remove" style="display:none">
|
||||
<a class="btn btn-default" href="#" onclick="removeRelatedProduct(); return false" id="related_product_remove_link">
|
||||
<i class="icon-trash"></i>
|
||||
@@ -299,8 +304,13 @@
|
||||
{l s='Short description:'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-8">
|
||||
{include file="controllers/products/textarea_lang.tpl" languages=$languages input_name='description_short' input_value=$product->description_short max=$PS_PRODUCT_SHORT_DESC_LIMIT}
|
||||
<div class="col-lg-9">
|
||||
{include
|
||||
file="controllers/products/textarea_lang.tpl"
|
||||
languages=$languages
|
||||
input_name='description_short'
|
||||
input_value=$product->description_short
|
||||
max=$PS_PRODUCT_SHORT_DESC_LIMIT}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -312,8 +322,11 @@
|
||||
{l s='Description:'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-8">
|
||||
{include file="controllers/products/textarea_lang.tpl" languages=$languages input_name='description' input_value=$product->description}
|
||||
<div class="col-lg-9">
|
||||
{include
|
||||
file="controllers/products/textarea_lang.tpl"
|
||||
languages=$languages input_name='description'
|
||||
input_value=$product->description}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -327,19 +340,21 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="createImageDescription" class="well" style="display:none">
|
||||
<div id="createImageDescription" class="panel" style="display:none">
|
||||
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-3">{l s='Select your image:'}</label>
|
||||
<div class="col-lg-5">
|
||||
{foreach from=$images item=image key=key}
|
||||
<p class="checkbox-inline">
|
||||
<input type="radio" name="smallImage" id="smallImage_{$key}" value="{$image.id_image}" {if $key == 0}checked="checked"{/if} >
|
||||
<label for="smallImage_{$key}" class="t">
|
||||
<img src="{$image.src}" alt="{$image.legend}" />
|
||||
</label>
|
||||
</p>
|
||||
{/foreach}
|
||||
<div class="col-lg-9">
|
||||
<ul class="list-inline">
|
||||
{foreach from=$images item=image key=key}
|
||||
<li>
|
||||
<input type="radio" name="smallImage" id="smallImage_{$key}" value="{$image.id_image}" {if $key == 0}checked="checked"{/if} >
|
||||
<label for="smallImage_{$key}" class="t">
|
||||
<img src="{$image.src}" alt="{$image.legend}" />
|
||||
</label>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -28,51 +28,68 @@
|
||||
var msg_set_quantity = "{l s="Please set a quantity to add a product." js=1}";
|
||||
</script>
|
||||
<input type="hidden" name="submitted_tabs[]" value="Pack" />
|
||||
<h4>{l s='Pack'}</h4>
|
||||
<div class="separation"></div>
|
||||
<legend>{l s='Pack'}</legend>
|
||||
<div class="alert alert-info">{l s='You cannot add combinations to a pack.'}</div>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="ppack">
|
||||
<input type="checkbox" name="ppack" id="ppack" value="1" {if $product_type == Product::PTYPE_PACK}checked="checked"{/if} onclick="$('#ppackdiv').slideToggle();" />
|
||||
<label class="t" for="ppack">{l s='Pack'}</label>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div id="ppackdiv" {if !($product_type == Product::PTYPE_PACK)}style="display: none;"{/if}>
|
||||
<div class="ppack">
|
||||
<input type="checkbox" name="ppack" id="ppack" value="1" {if $product_type == Product::PTYPE_PACK}checked="checked"{/if} onclick="$('#ppackdiv').slideToggle();" />
|
||||
<label class="t" for="ppack">{l s='Pack'}</label>
|
||||
</div>
|
||||
|
||||
<label for="curPackItemName" style="width:560px;text-align:left;">
|
||||
{l s='Begin typing the first letters of the product name. Then select the product from the drop-down list:'}
|
||||
</label><br /><br />
|
||||
<div id="ppackdiv" {if !($product_type == Product::PTYPE_PACK)}style="display: none;"{/if}>
|
||||
|
||||
<input type="text" size="25" id="curPackItemName" />
|
||||
<input type="text" name="curPackItemQty" id="curPackItemQty" value="1" size="1" />
|
||||
<input type="hidden" name="inputPackItems" id="inputPackItems" value="{$input_pack_items}" />
|
||||
<input type="hidden" name="namePackItems" id="namePackItems" value="{$input_namepack_items}" />
|
||||
<input type="hidden" size="2" id="curPackItemId" />
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-3" for="curPackItemName">
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
title="{l s='Begin typing the first letters of the product name. Then select the product from the drop-down list:'}">
|
||||
{l s='Product'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="input-group col-lg-6">
|
||||
<input type="text" id="curPackItemName" />
|
||||
<span class="input-group-addon"><i class="icon-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-3" for="curPackItemQty">
|
||||
{l s='Quantity'}
|
||||
</label>
|
||||
<div class="input-group col-lg-2">
|
||||
<span class="input-group-addon">×</span>
|
||||
<input type="text" name="curPackItemQty" id="curPackItemQty" value="1"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span id="add_pack_item" class="button" style="cursor: pointer;">
|
||||
{l s='Add this product to the pack'}
|
||||
</span>
|
||||
<div class="row">
|
||||
<div class="col-lg-9 col-offset-3">
|
||||
<button type="button" id="add_pack_item" class="btn btn-default">
|
||||
<i class="icon-plus-sign-alt"></i> {l s='Add this product to the pack'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="product_description listOfPack" style="display:{if count($pack_items) > 0}block{else}none{/if};text-align: left;">
|
||||
<br />{l s='List of products for that pack:'}
|
||||
</p>
|
||||
<input type="hidden" name="inputPackItems" id="inputPackItems" value="{$input_pack_items}" />
|
||||
<input type="hidden" name="namePackItems" id="namePackItems" value="{$input_namepack_items}" />
|
||||
<input type="hidden" id="curPackItemId" />
|
||||
|
||||
<div id="divPackItems">
|
||||
{foreach $pack_items as $pack_item}
|
||||
{$pack_item.pack_quantity} x {$pack_item.name}
|
||||
<span class="delPackItem" name="{$pack_item.id}" style="cursor: pointer;">
|
||||
<img src="../img/admin/delete.gif" />
|
||||
</span><br />
|
||||
{/foreach}
|
||||
</div>
|
||||
<hr/>
|
||||
|
||||
<br />
|
||||
<p class="alert alert-info" style="display:block">{l s='You cannot add combinations to a pack.'}</p>
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-3 product_description listOfPack" style="display:{if count($pack_items) > 0}block{else}none{/if};">
|
||||
{l s='List of products for that pack:'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<ul id="divPackItems">
|
||||
{foreach $pack_items as $pack_item}
|
||||
<li>
|
||||
<button type="button" class="btn btn-default delPackItem" name="{$pack_item.id}">
|
||||
<i class="icon-trash"></i>
|
||||
</button>
|
||||
{$pack_item.pack_quantity} x {$pack_item.name}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</div>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -72,61 +72,62 @@
|
||||
{l s='Click "Save and Stay" after changing selected suppliers to display the associated product references.'}
|
||||
</div>
|
||||
|
||||
<div id="suppliers_accordion">
|
||||
<div id="accordion-supplier">
|
||||
{foreach from=$associated_suppliers item=supplier}
|
||||
<h3>
|
||||
<a href="#">{$supplier->name}</a>
|
||||
</h3>
|
||||
|
||||
<div>
|
||||
|
||||
<table class="table">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Product name'}</th>
|
||||
<th>{l s='Supplier reference'}</th>
|
||||
<th>{l s='Unit price tax excluded'}</th>
|
||||
<th>{l s='Unit price currency'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{foreach $attributes AS $index => $attribute}
|
||||
{assign var=reference value=''}
|
||||
{assign var=price_te value=''}
|
||||
{assign var=id_currency value=$id_default_currency}
|
||||
{foreach from=$associated_suppliers_collection item=asc}
|
||||
{if $asc->id_product == $attribute['id_product'] && $asc->id_product_attribute == $attribute['id_product_attribute'] && $asc->id_supplier == $supplier->id_supplier}
|
||||
{assign var=reference value=$asc->product_supplier_reference}
|
||||
{assign var=price_te value=Tools::ps_round($asc->product_supplier_price_te, 2)}
|
||||
{if $asc->id_currency}
|
||||
{assign var=id_currency value=$asc->id_currency}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<tr {if $index is odd}class="alt_row"{/if}>
|
||||
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
|
||||
<td>
|
||||
<input type="text" size="10" value="{$reference|escape:'htmlall':'UTF-8'}" name="supplier_reference_{$attribute['id_product']}_{$attribute['id_product_attribute']}_{$supplier->id_supplier}" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" size="10" value="{$price_te|htmlentities}" name="product_price_{$attribute['id_product']}_{$attribute['id_product_attribute']}_{$supplier->id_supplier}" />
|
||||
</td>
|
||||
<td>
|
||||
<select name="product_price_currency_{$attribute['id_product']}_{$attribute['id_product_attribute']}_{$supplier->id_supplier}">
|
||||
{foreach $currencies AS $currency}
|
||||
<option value="{$currency['id_currency']}"
|
||||
{if $currency['id_currency'] == $id_currency}selected="selected"{/if}
|
||||
>{$currency['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#supplier-{$supplier->id}">{$supplier->name}</a>
|
||||
</div>
|
||||
<div id="supplier-{$supplier->id}" class="accordion-body collapse in">
|
||||
<div class="accordion-inner">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Product name'}</th>
|
||||
<th>{l s='Supplier reference'}</th>
|
||||
<th>{l s='Unit price tax excluded'}</th>
|
||||
<th>{l s='Unit price currency'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{foreach $attributes AS $index => $attribute}
|
||||
{assign var=reference value=''}
|
||||
{assign var=price_te value=''}
|
||||
{assign var=id_currency value=$id_default_currency}
|
||||
{foreach from=$associated_suppliers_collection item=asc}
|
||||
{if $asc->id_product == $attribute['id_product'] && $asc->id_product_attribute == $attribute['id_product_attribute'] && $asc->id_supplier == $supplier->id_supplier}
|
||||
{assign var=reference value=$asc->product_supplier_reference}
|
||||
{assign var=price_te value=Tools::ps_round($asc->product_supplier_price_te, 2)}
|
||||
{if $asc->id_currency}
|
||||
{assign var=id_currency value=$asc->id_currency}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<tr {if $index is odd}class="alt_row"{/if}>
|
||||
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
|
||||
<td>
|
||||
<input type="text" value="{$reference|escape:'htmlall':'UTF-8'}" name="supplier_reference_{$attribute['id_product']}_{$attribute['id_product_attribute']}_{$supplier->id_supplier}" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" value="{$price_te|htmlentities}" name="product_price_{$attribute['id_product']}_{$attribute['id_product_attribute']}_{$supplier->id_supplier}" />
|
||||
</td>
|
||||
<td>
|
||||
<select name="product_price_currency_{$attribute['id_product']}_{$attribute['id_product_attribute']}_{$supplier->id_supplier}">
|
||||
{foreach $currencies AS $currency}
|
||||
<option value="{$currency['id_currency']}"
|
||||
{if $currency['id_currency'] == $id_currency}selected="selected"{/if}
|
||||
>{$currency['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
@@ -23,18 +23,31 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="translatable">
|
||||
{foreach from=$languages item=language}
|
||||
<div class="lang_{$language.id_lang}" style="{if !$language.is_default}display:none;{/if}">
|
||||
<textarea id="{$input_name}_{$language.id_lang}"
|
||||
{foreach from=$languages item=language}
|
||||
<div class="row translatable-field lang-{$language.id_lang}">
|
||||
<div class="col-lg-10">
|
||||
<textarea
|
||||
id="{$input_name}_{$language.id_lang}"
|
||||
name="{$input_name}_{$language.id_lang}"
|
||||
class="autoload_rte" >{if isset($input_value[$language.id_lang])}{$input_value[$language.id_lang]|htmlentitiesUTF8}{/if}
|
||||
class="autoload_rte" >
|
||||
{if isset($input_value[$language.id_lang])}{$input_value[$language.id_lang]|htmlentitiesUTF8}{/if}
|
||||
</textarea>
|
||||
<span class="counter" max="{if isset($max)}{$max}{else}none{/if}"></span>
|
||||
<span class="help-block">{$hint|default:''}</span>
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="col-lg-2">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<img src="{$base_url}/img/l/{$language.id_lang|intval}.jpg" alt="">
|
||||
{$language.iso_code}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach from=$languages item=language}
|
||||
<li><a href="javascript:hideOtherLanguage({$language.id_lang});"><img src="{$base_url}/img/l/{$language.id_lang|intval}.jpg" alt=""> {$language.iso_code}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<span class="counter" max="{if isset($max)}{$max}{else}none{/if}"></span>
|
||||
{/foreach}
|
||||
|
||||
<script type="text/javascript">
|
||||
var iso = '{$iso_tiny_mce}';
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<meta name="robots" content="NOFOLLOW, NOINDEX">
|
||||
|
||||
<title>{$meta_title} - PrestaShop™</title>
|
||||
{if $display_header}
|
||||
{if $display_header}
|
||||
<script type="text/javascript">
|
||||
var help_class_name = '{$controller_name}';
|
||||
var iso_user = '{$iso_user}';
|
||||
@@ -76,35 +76,40 @@
|
||||
var currentIndex = '{$currentIndex}';
|
||||
var default_language = '{$default_language|intval}';
|
||||
</script>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if isset($css_files)}
|
||||
{foreach from=$css_files key=css_uri item=media}
|
||||
{if isset($css_files)}
|
||||
{foreach from=$css_files key=css_uri item=media}
|
||||
<link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" />
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
{if isset($js_files)}
|
||||
{if isset($js_files)}
|
||||
{foreach from=$js_files item=js_uri}
|
||||
<script type="text/javascript" src="{$js_uri}"></script>
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<link rel="icon" type="image/vnd.microsoft.icon" href="{$img_dir}favicon.ico" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{$img_dir}favicon.ico" />
|
||||
{if isset($displayBackOfficeHeader)}
|
||||
{$displayBackOfficeHeader}
|
||||
{/if}
|
||||
|
||||
{if isset($displayBackOfficeHeader)}
|
||||
{$displayBackOfficeHeader}
|
||||
{/if}
|
||||
<!--[if IE]>
|
||||
<link type="text/css" rel="stylesheet" href="{$base_url}css/admin-ie.css" />
|
||||
<![endif]-->
|
||||
|
||||
{if isset($brightness)}
|
||||
<style type="text/css">
|
||||
div#header_infos, div#header_infos a#header_shopname, div#header_infos a#header_logout, div#header_infos a#header_foaccess {ldelim}color:{$brightness}{rdelim}
|
||||
</style>
|
||||
{/if}
|
||||
{*if isset($brightness)*}
|
||||
<!--
|
||||
/// multishop
|
||||
<style type="text/css">
|
||||
div#header_infos, div#header_infos a#header_shopname, div#header_infos a#header_logout, div#header_infos a#header_foaccess {ldelim}color:{$brightness}{rdelim}
|
||||
</style>
|
||||
-->
|
||||
{*/if*}
|
||||
|
||||
<link href='http://fonts.googleapis.com/css?family=Ubuntu:300|Open+Sans' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=Ubuntu:300|Open+Sans' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
@@ -114,8 +119,8 @@
|
||||
|
||||
{* begin HEADER *}
|
||||
<div class="container-fluid">
|
||||
<div id="header" class="navbar navbar-fixed-top navbar-inverse" >
|
||||
<div id="header_infos">
|
||||
<div id="header">
|
||||
<div id="header_infos" class="navbar navbar-fixed-top navbar-inverse">
|
||||
<a id="header_shopname" class="navbar-brand" href="{$link->getAdminLink('AdminHome')|escape:'htmlall':'UTF-8'}">{$shop_name}</a>
|
||||
|
||||
<ul id="notifs_icon_wrapper" class="nav navbar-nav nav-pills">
|
||||
@@ -196,7 +201,8 @@
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<!-- <select name="bo_search_type" id="bo_search_type" class="chosen no-search">
|
||||
<!-- // Search in section
|
||||
<select name="bo_search_type" id="bo_search_type" class="chosen no-search">
|
||||
<option value="0">{l s='everywhere'}</option>
|
||||
<option value="1" {if {$search_type} == 1} selected="selected" {/if}>{l s='catalog'}</option>
|
||||
<optgroup label="{l s='customers'}:">
|
||||
@@ -240,6 +246,11 @@
|
||||
<div class="mainsubtablist" style="display:none"></div>
|
||||
{/if}
|
||||
<ul id="menu">
|
||||
<li class="maintab {if $t.current}active{/if}">
|
||||
<a href="{$link->getAdminLink('AdminHome')|escape:'htmlall':'UTF-8'}" class="title">
|
||||
<i class="icon-AdminDashboard"></i> Dashboard
|
||||
</a>
|
||||
</li>
|
||||
{foreach $tabs AS $t}
|
||||
{if $t.active}
|
||||
<li class="maintab {if $t.current}active{/if}" id="maintab{$t.id_tab}">
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
{if isset($fields.title)}<h2>{$fields.title}</h2>{/if}
|
||||
{block name="defaultForm"}
|
||||
<form id="{$table}_form" class="defaultForm {$name_controller}" action="{$current}&{if !empty($submit_action)}{$submit_action}=1{/if}&token={$token}" method="post" enctype="multipart/form-data" {if isset($style)}style="{$style}"{/if}>
|
||||
<form id="{$table}_form" class="form-horizontal defaultForm {$name_controller}" action="{$current}&{if !empty($submit_action)}{$submit_action}=1{/if}&token={$token}" method="post" enctype="multipart/form-data" {if isset($style)}style="{$style}"{/if}>
|
||||
{if $form_id}
|
||||
<input type="hidden" name="{$identifier}" id="{$identifier}" value="{$form_id}" />
|
||||
{/if}
|
||||
@@ -40,12 +40,14 @@
|
||||
{if $key == 'legend'}
|
||||
<legend>
|
||||
{if isset($field.image)}<img src="{$field.image}" alt="{$field.title|escape:'htmlall':'UTF-8'}" />{/if}
|
||||
{if isset($field.icon)}<i class="{$field.icon}"/></i>{/if}
|
||||
{$field.title}
|
||||
</legend>
|
||||
{elseif $key == 'description' && $field}
|
||||
<p class="description">{$field}</p>
|
||||
<div class="alert alert-info">{$field}</div>
|
||||
{elseif $key == 'input'}
|
||||
{foreach $field as $input}
|
||||
<div class="row">
|
||||
{if $input.type == 'hidden'}
|
||||
<input type="hidden" name="{$input.name}" id="{$input.name}" value="{$fields_value[$input.name]|escape:'htmlall':'UTF-8'}" />
|
||||
{else}
|
||||
@@ -53,10 +55,20 @@
|
||||
<div id="contains_states" {if !$contains_states}style="display:none;"{/if}>
|
||||
{/if}
|
||||
{block name="label"}
|
||||
{if isset($input.label)}<label>{$input.label} </label>{/if}
|
||||
{if isset($input.label)}
|
||||
<label for="" class="control-label col-lg-3 {if isset($input.required) && $input.required && $input.type != 'radio'}required{/if}">
|
||||
{if isset($input.hint)}
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
title="{$input.hint}">
|
||||
{/if}
|
||||
{$input.label}
|
||||
{if isset($input.hint)}
|
||||
</span>
|
||||
{/if}
|
||||
</label>{/if}
|
||||
{/block}
|
||||
{block name="field"}
|
||||
<div class="margin-form">
|
||||
<div class="col-lg-9">
|
||||
{block name="input"}
|
||||
{if $input.type == 'text' || $input.type == 'tags'}
|
||||
{if isset($input.lang) AND $input.lang}
|
||||
@@ -87,7 +99,6 @@
|
||||
{if isset($input.readonly) && $input.readonly}readonly="readonly"{/if}
|
||||
{if isset($input.disabled) && $input.disabled}disabled="disabled"{/if}
|
||||
{if isset($input.autocomplete) && !$input.autocomplete}autocomplete="off"{/if} />
|
||||
{if !empty($input.hint)}<span class="alert alert-info" name="help_box">{$input.hint}<span class="hint-pointer"> </span></span>{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
@@ -209,6 +220,40 @@
|
||||
{if isset($input.br) && $input.br}<br />{/if}
|
||||
{if isset($value.p) && $value.p}<p>{$value.p}</p>{/if}
|
||||
{/foreach}
|
||||
{elseif $input.type == 'switch'}
|
||||
<div class="input-group col-lg-2">
|
||||
<span class="switch prestashop-switch">
|
||||
{foreach $input.values as $value}
|
||||
<input
|
||||
type="radio"
|
||||
name="{$input.name}"
|
||||
{if $value.value == 1}
|
||||
id="{$input.name}_on"
|
||||
{else}
|
||||
id="{$input.name}_off"
|
||||
{/if}
|
||||
value="$value.value"
|
||||
{if $fields_value[$input.name] == $value.value}checked="checked"{/if}
|
||||
{if isset($input.disabled) && $input.disabled}disabled="disabled"{/if}
|
||||
/>
|
||||
<label
|
||||
class="t radio"
|
||||
{if $value.value == 1}
|
||||
for="{$input.name}_on"
|
||||
{else}
|
||||
for="{$input.name}_off"
|
||||
{/if}
|
||||
>
|
||||
{if $value.value == 1}
|
||||
<i class="icon-check-sign"></i> {l s='Yes'}
|
||||
{else}
|
||||
<i class="icon-ban-circle"></i> {l s='No'}
|
||||
{/if}
|
||||
</label>
|
||||
{/foreach}
|
||||
<span class="slide-button btn btn-default"></span>
|
||||
</span>
|
||||
</div>
|
||||
{elseif $input.type == 'textarea'}
|
||||
{if isset($input.lang) AND $input.lang}
|
||||
<div class="translatable">
|
||||
@@ -315,7 +360,7 @@
|
||||
{elseif $input.type == 'free'}
|
||||
{$fields_value[$input.name]}
|
||||
{/if}
|
||||
{if isset($input.required) && $input.required && $input.type != 'radio'} <sup>*</sup>{/if}
|
||||
<!-- {if isset($input.required) && $input.required && $input.type != 'radio'} <sup>*</sup>{/if} -->
|
||||
{/block}{* end block input *}
|
||||
{block name="description"}
|
||||
{if isset($input.desc) && !empty($input.desc)}
|
||||
@@ -334,14 +379,13 @@
|
||||
</p>
|
||||
{/if}
|
||||
{/block}
|
||||
{if isset($input.lang) && isset($languages)}<div class="clear"></div>{/if}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
{/block}{* end block field *}
|
||||
{if $input.name == 'id_state'}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
{hook h='displayAdminForm'}
|
||||
{if isset($name_controller)}
|
||||
@@ -377,9 +421,9 @@
|
||||
{/if}
|
||||
{block name="other_input"}{/block}
|
||||
{/foreach}
|
||||
{if $required_fields}
|
||||
<div class="small"><sup>*</sup> {l s='Required field'}</div>
|
||||
{/if}
|
||||
<!-- {if $required_fields}
|
||||
<div class="small"><sup>*</sup> {l s='Required field'}</div>
|
||||
{/if} -->
|
||||
</fieldset>
|
||||
{block name="other_fieldsets"}{/block}
|
||||
{if isset($fields[$f+1])}<br />{/if}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
{if $bulk_actions}
|
||||
<p>
|
||||
{foreach $bulk_actions as $key => $params}
|
||||
<input type="submit" class="btn" name="submitBulk{$key}{$table}" value="{$params.text}" {if isset($params.confirm)}onclick="return confirm('{$params.confirm}');"{/if} />
|
||||
<input type="submit" class="btn btn-default" name="submitBulk{$key}{$table}" value="{$params.text}" {if isset($params.confirm)}onclick="return confirm('{$params.confirm}');"{/if} />
|
||||
{/foreach}
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
@@ -58,33 +58,26 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
$this->fields_list = array(
|
||||
'id_category' => array(
|
||||
'title' => $this->l('ID'),
|
||||
'align' => 'center',
|
||||
'width' => 20
|
||||
'align' => 'center'
|
||||
),
|
||||
'name' => array(
|
||||
'title' => $this->l('Name'),
|
||||
'width' => 'auto'
|
||||
'title' => $this->l('Name')
|
||||
),
|
||||
'description' => array(
|
||||
'title' => $this->l('Description'),
|
||||
'width' => 500,
|
||||
'maxlength' => 90,
|
||||
'callback' => 'getDescriptionClean',
|
||||
'orderby' => false
|
||||
),
|
||||
'position' => array(
|
||||
'title' => $this->l('Position'),
|
||||
'width' => 40,
|
||||
'filter_key' => 'sa!position',
|
||||
'align' => 'center',
|
||||
'position' => 'position'
|
||||
'position' => 'position',
|
||||
'align' => 'center'
|
||||
),
|
||||
'active' => array(
|
||||
'title' => $this->l('Displayed'),
|
||||
'active' => 'status',
|
||||
'align' => 'center',
|
||||
'type' => 'bool',
|
||||
'width' => 70,
|
||||
'orderby' => false
|
||||
)
|
||||
);
|
||||
@@ -338,7 +331,7 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
'tinymce' => true,
|
||||
'legend' => array(
|
||||
'title' => $this->l('Category'),
|
||||
'image' => '../img/admin/tab-categories.gif'
|
||||
'icon' => 'icon-tags'
|
||||
),
|
||||
'input' => array(
|
||||
array(
|
||||
@@ -346,13 +339,12 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
'label' => $this->l('Name:'),
|
||||
'name' => 'name',
|
||||
'lang' => true,
|
||||
'size' => 48,
|
||||
'required' => true,
|
||||
'class' => 'copy2friendlyUrl',
|
||||
'hint' => $this->l('Invalid characters:').' <>;=#{}',
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'type' => 'switch',
|
||||
'label' => $this->l('Displayed:'),
|
||||
'name' => 'active',
|
||||
'required' => false,
|
||||
@@ -392,7 +384,7 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
)
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'type' => 'switch',
|
||||
'label' => $this->l('Root Category:'),
|
||||
'name' => 'is_root_category',
|
||||
'required' => false,
|
||||
|
||||
@@ -1019,8 +1019,8 @@ product_tabs['Pack'] = new function(){
|
||||
var lineDisplay = curPackItemQty+ 'x ' +curPackItemName;
|
||||
|
||||
var divContent = $('#divPackItems').html();
|
||||
divContent += lineDisplay;
|
||||
divContent += '<span class="delPackItem" name="' + curPackItemId + '" style="cursor: pointer;"><img src="../img/admin/delete.gif" /></span><br />';
|
||||
divContent += '<li><button class="btn btn-default delPackItem" name="' + curPackItemId + '" ><i class="icon-trash"></i></button>'+
|
||||
lineDisplay+'</li>';
|
||||
|
||||
// QTYxID-QTYxID
|
||||
// @todo : it should be better to create input for each items and each qty
|
||||
@@ -1071,7 +1071,7 @@ product_tabs['Pack'] = new function(){
|
||||
{
|
||||
input.value += inputCut[i] + '-';
|
||||
name.value += nameCut[i] + '¤';
|
||||
div.innerHTML += nameCut[i] + ' <span class="delPackItem" name="' + inputQty[1] + '" style="cursor: pointer;"><img src="../img/admin/delete.gif" /></span><br />';
|
||||
div.innerHTML += nameCut[i] + '<li><button class="btn btn-default delPackItem" name="' + inputQty[1] + '"><i class="icon-trash"></i></button></li>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user