Merge branch 'develop' into gli-2939

This commit is contained in:
Amit sharma
2026-06-01 17:41:40 +05:30
179 changed files with 8470 additions and 1307 deletions

View File

@@ -30,324 +30,330 @@ $color-calendar-range: lighten($color-calendar,10%)
$color-calendar-range-compare: lighten($color-calendar-compare,10%)
.datepicker2
background: #fff
position: absolute
z-index: 599
right: -10rem
.daterangepicker
border-radius: 5px 5px 0 0 !important
background: #fff
position: absolute
z-index: 599
right: -10rem
.daterangepicker
border-radius: 5px 5px 0 0 !important
.bootstrap
#datepicker
.daterangepicker
position: relative
width: 100%
font-family: Verdana, Arial, sans-serif
font-size: 13px
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.26)
margin-bottom: 8px
padding: 12px
border-bottom-left-radius: 0
border-bottom-right-radius: 0
table
width: 100%
margin: 0
border-spacing: 1px
thead
tr th
text-transform: uppercase
text-align: center
font-weight: bold
border: 0
background-color: #fff !important
color: #777 !important
font-size: 14px
tr:first-child th
padding-bottom: 10px
text-transform: capitalize
.icon-angle-left
font-weight: bold
padding-left: 6px
&:after
content: ''
position: absolute
top: -5px
left: -2px
width: 24px
height: 24px
background-color: #f0f0f0
z-index: -1
border-radius: 50%
.icon-angle-right
font-weight: bold
padding-right: 6px
&:after
content: ''
position: absolute
top: -5px
right: -2px
width: 24px
height: 24px
background-color: #f0f0f0
z-index: -1
border-radius: 50%
td, th
text-align: center
padding: 0
position: relative
tr
border-bottom: solid 1px white
td
color: #555
font-size: 14px
line-height: 25px
padding: 5px 10px
&.day:after
content: ""
position: absolute
display: block
top: 0
width: 100%
z-index: 0
background-color: transparent
@include left(0)
&.day:hover
cursor: pointer
color: #212121
&.day.disabled
color: $color-calendar-outrange
&.old, &.new
color: $color-calendar-outrange
&.start-selected:not(.old):not(.new):not(.end-selected)
color: $color-bright
background-color: #1292ff
//@extend .chevron-left
&.range-compare
background-color: mix($color-calendar-day-selected,$color-calendar-range-compare,70%)
@include border-left-radius(0)
&.end-selected-compare, &.start-selected-compare
background-color: mix($color-calendar-day-selected,$color-calendar-day-selected-compare,70%)
&.end-selected-compare
@include border-radius(0)
&.end-selected:not(.old):not(.new):not(.start-selected)
color: $color-bright
background-color: #1292ff
//@extend .chevron-right
&.range-compare
background-color: mix($color-calendar-day-selected,$color-calendar-range-compare,70%)
@include border-right-radius(0)
&.end-selected-compare, &.start-selected-compare
background-color: mix($color-calendar-day-selected,$color-calendar-day-selected-compare,70%)
&.start-selected-compare
@include border-radius(0)
&.start-selected-compare:not(.old):not(.new):not(.end-selected-compare)
color: $color-bright
font-weight: 700
background-color: $color-calendar-day-selected-compare
@include border-left-radius(15px)
&.range
background-color: #f2f2f2
@include border-left-radius(0)
&.end-selected-compare:not(.old):not(.new):not(.start-selected-compare)
color: $color-bright
font-weight: 700
background-color: $color-calendar-day-selected-compare
@include border-right-radius(15px)
&.range
background-color: #f2f2f2
@include border-right-radius(0)
&.end-selected.start-selected
color: $color-bright
font-weight: 700
background-color: $color-calendar-day-selected
&.range-compare
background-color: mix($color-calendar-day-selected,$color-calendar-range-compare,70%)
@include border-radius(0)
&.end-selected-compare.start-selected-compare
color: $color-bright
@include border-radius(15px)
font-weight: 700
background-color: $color-calendar-day-selected-compare
&.range
background-color: mix($color-calendar-day-selected-compare,$color-calendar-range,70%)
@include border-radius(0)
&.range
color: #333
background-color: #f2f2f2
&.range-compare
background-color: mix($color-calendar-range,$color-calendar-range-compare,50%)
&.range-compare
color: lighten($color-calendar-range-compare,35%)
background-color: $color-calendar-range-compare
&.range
background-color: mix($color-calendar-range,$color-calendar-range-compare,50%)
&.today
background-color: $color-bright
span
padding: 0
display: block
width: 33.333%
height: 3em
line-height: 3em
font-weight: 400
float: left
text-transform: uppercase
cursor: pointer
&:hover
color: white
background-color: $color-calendar-day-selected
&.active
background-color: $color-calendar-day-selected
color: #fff
&.old
color: $color-calendar-outrange
th
&.next
@include text-align(right)
&.prev
@include text-align(left)
&.next, &.prev, &.month-switch
font-size: 16px !important
font-weight: normal
color: #333 !important
&:hover
opacity: 0.8
thead tr:first-child th
cursor: pointer
#datepicker
.daterangepicker
position: relative
width: 100%
font-family: Verdana, Arial, sans-serif
font-size: 13px
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.26)
margin-bottom: 8px
padding: 12px
border-bottom-left-radius: 0
border-bottom-right-radius: 0
table
width: 100%
margin: 0
border-spacing: 1px
thead
tr th
text-transform: uppercase
text-align: center
font-weight: bold
border: 0
background-color: #fff !important
color: #777 !important
font-size: 14px
tr:first-child th
padding-bottom: 10px
text-transform: capitalize
.icon-angle-left
font-weight: bold
padding-left: 6px
&:after
content: ''
position: absolute
top: -5px
left: -2px
width: 24px
height: 24px
background-color: #f0f0f0
z-index: -1
border-radius: 50%
.icon-angle-right
font-weight: bold
padding-right: 6px
&:after
content: ''
position: absolute
top: -5px
right: -2px
width: 24px
height: 24px
background-color: #f0f0f0
z-index: -1
border-radius: 50%
td, th
text-align: center
padding: 0
position: relative
tr
border-bottom: solid 1px white
td
color: #555
font-size: 14px
line-height: 25px
padding: 5px 10px
&.day:after
content: ""
position: absolute
display: block
top: 0
width: 100%
z-index: 0
background-color: transparent
@include left(0)
&.day:hover
cursor: pointer
color: #212121
&.day.disabled
color: $color-calendar-outrange
&.old, &.new
color: $color-calendar-outrange
&.start-selected:not(.old):not(.new):not(.end-selected)
color: $color-bright
background-color: #1292ff
//@extend .chevron-left
&.range-compare
background-color: mix($color-calendar-day-selected,$color-calendar-range-compare,70%)
@include border-left-radius(0)
&.end-selected-compare, &.start-selected-compare
background-color: mix($color-calendar-day-selected,$color-calendar-day-selected-compare,70%)
&.end-selected-compare
@include border-radius(0)
&.end-selected:not(.old):not(.new):not(.start-selected)
color: $color-bright
background-color: #1292ff
//@extend .chevron-right
&.range-compare
background-color: mix($color-calendar-day-selected,$color-calendar-range-compare,70%)
@include border-right-radius(0)
&.end-selected-compare, &.start-selected-compare
background-color: mix($color-calendar-day-selected,$color-calendar-day-selected-compare,70%)
&.start-selected-compare
@include border-radius(0)
&.start-selected-compare:not(.old):not(.new):not(.end-selected-compare)
color: $color-bright
font-weight: 700
background-color: $color-calendar-day-selected-compare
@include border-left-radius(15px)
&.range
background-color: #f2f2f2
@include border-left-radius(0)
&.end-selected-compare:not(.old):not(.new):not(.start-selected-compare)
color: $color-bright
font-weight: 700
background-color: $color-calendar-day-selected-compare
@include border-right-radius(15px)
&.range
background-color: #f2f2f2
@include border-right-radius(0)
&.end-selected.start-selected
color: $color-bright
font-weight: 700
background-color: $color-calendar-day-selected
&.range-compare
background-color: mix($color-calendar-day-selected,$color-calendar-range-compare,70%)
@include border-radius(0)
&.end-selected-compare.start-selected-compare
color: $color-bright
@include border-radius(15px)
font-weight: 700
background-color: $color-calendar-day-selected-compare
&.range
background-color: mix($color-calendar-day-selected-compare,$color-calendar-range,70%)
@include border-radius(0)
&.range
color: #333
background-color: #f2f2f2
&.range-compare
background-color: mix($color-calendar-range,$color-calendar-range-compare,50%)
&.range-compare
color: lighten($color-calendar-range-compare,35%)
background-color: $color-calendar-range-compare
&.range
background-color: mix($color-calendar-range,$color-calendar-range-compare,50%)
&.today
background-color: $color-bright
span
padding: 0
display: block
width: 33.333%
height: 3em
line-height: 3em
font-weight: 400
float: left
text-transform: uppercase
cursor: pointer
&:hover
color: white
background-color: $color-calendar-day-selected
&.active
background-color: $color-calendar-day-selected
color: #fff
&.old
color: $color-calendar-outrange
th
&.next
@include text-align(right)
&.prev
@include text-align(left)
&.next, &.prev, &.month-switch
font-size: 16px !important
font-weight: normal
color: #333 !important
&:hover
opacity: 0.8
thead tr:first-child th
cursor: pointer
.ui-datepicker
margin: 5px auto 0
width: auto !important
z-index: 111111 !important
top: 0
left: 0
padding: 12px !important
margin-top: 1px
@include border-radius(4px)
.ui-datepicker-header
background: none
border: none
color: gray
font-weight: normal
.ui-datepicker-title
color: #333
font-size: 16px
font-style: normal
th
font-size: 12px
font-weight: 600
color: #777
text-transform: uppercase
tbody
td
&:last-child
border-right: 0px
tr
border-bottom: 1px solid #bbb
border: none
&:last-child
border-bottom: 0px
a
text-decoration: none
.ui-state-highlight
border: solid 1px darken(#FEFBE2 ,50%) !important
background: #FEFBE2 !important
.ui-datepicker-today
background: #e7f4ff !important
.ui-state-highlight
color: #1292ff !important
.ui-datepicker-current-day, .ui-datepicker-today.ui-datepicker-current-day
background-color: #1292ff !important
.ui-datepicker-current-day, .ui-datepicker-today.ui-datepicker-current-day .ui-state-highlight
color: #fff !important
.ui-state-active
color: white !important
background: $primary-color !important
border: solid 1px darken($primary-color,10%) !important
.ui-datepicker-prev-hover
left: 2px !important
margin: 5px auto 0
width: auto !important
z-index: 111111 !important
top: 0
left: 0
padding: 12px !important
margin-top: 1px
@include border-radius(4px)
.ui-datepicker-header
background: none
border: none
color: gray
font-weight: normal
.ui-datepicker-title
color: #333
font-size: 16px
font-style: normal
th
font-size: 12px
font-weight: 600
color: #777
text-transform: uppercase
tbody
td
&:last-child
border-right: 0px
tr
border-bottom: 1px solid #bbb
border: none
&:last-child
border-bottom: 0px
a
text-decoration: none
.ui-state-highlight
border: solid 1px darken(#FEFBE2 ,50%) !important
background: #FEFBE2 !important
.ui-datepicker-today
background: #e7f4ff !important
.ui-state-highlight
color: #1292ff !important
.ui-datepicker-current-day, .ui-datepicker-today.ui-datepicker-current-day
background-color: #1292ff !important
.ui-datepicker-current-day, .ui-datepicker-today.ui-datepicker-current-day .ui-state-highlight
color: #fff !important
.ui-state-active
color: white !important
background: $primary-color !important
border: solid 1px darken($primary-color,10%) !important
.ui-datepicker-prev-hover
left: 2px !important
.form-date-actions .btn:hover, .form-date-actions .btn:focus, .form-date-actions .btn:active
outline: unset !important
text-decoration: none
outline: unset !important
text-decoration: none
.form-date-actions
bottom: -27px
position: absolute
width: 100%
z-index: 599
background-color: #fff
box-shadow: 0 7px 10px 0 rgba(0,0,0,0.26)
padding: 2px
border-bottom-left-radius: 4px
border-bottom-right-radius: 4px
bottom: -27px
position: absolute
width: 100%
z-index: 599
background-color: #fff
box-shadow: 0 7px 10px 0 rgba(0,0,0,0.26)
padding: 2px
border-bottom-left-radius: 4px
border-bottom-right-radius: 4px
.ui-datepicker-prev
float: left
cursor: pointer
&::before
background-position: center -30px
font-weight: bold
font-size: 16px
color: #333
content: "\f104"
font-family: FontAwesome
position: absolute
left: 8px
float: left
cursor: pointer
&::before
background-position: center -30px
font-weight: bold
font-size: 16px
color: #333
content: "\f104"
font-family: FontAwesome
position: absolute
left: 8px
.ui-datepicker-next
float: right
cursor: pointer
&::before
background-position: center -30px
font-weight: bold
font-size: 16px
color: #333
content: "\f105"
font-family: FontAwesome
position: absolute
right: 8px
&:hover
top: 5px !important
right: 2px !important
float: right
cursor: pointer
&::before
background-position: center -30px
font-weight: bold
font-size: 16px
color: #333
content: "\f105"
font-family: FontAwesome
position: absolute
right: 8px
&:hover, &.ui-datepicker-next-hover
top: 5px !important
right: 2px !important
.ui-datepicker-rtl
.ui-datepicker-next
&:hover, &.ui-datepicker-next-hover
left: 2px !important
right: auto !important
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus
border: unset
background: none
font-weight: none
color: none
border: unset
background: none
font-weight: none
color: none
.ui-widget-content.ui-datepicker
border: none
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.26)
border: none
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.26)
.ui-datepicker td span,
.ui-datepicker td a
display: inline-block
text-align: center
line-height: 25px
color: #ffffff
display: inline-block
text-align: center
line-height: 25px
color: #ffffff
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next
top: 5px !important
background-color: #f0f0f0
border: none
border-radius: 50%
top: 5px !important
background-color: #f0f0f0
border: none
border-radius: 50%
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default
border: none !important
background: transparent !important
font-size: 14px
color: #333
border: none !important
background: transparent !important
font-size: 14px
color: #333
.ui-widget-content
.ui-icon
background-image: none !important
.ui-icon
background-image: none !important
.ui-datepicker td span, .ui-datepicker td a
text-align: center !important
padding: 4px 9px !important
text-align: center !important
padding: 4px 9px !important
.ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus
background: unset !important
border: unset !important
background: unset !important
border: unset !important
.ui-widget-content .ui-slider-handle, .ui-datepicker-current .ui-slider-handle
border: 1px solid #d3d3d3 !important
color: #555555 !important
background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) !important
border: 1px solid #d3d3d3 !important
color: #555555 !important
background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) !important
.ui-datepicker-prev-hover
top: unset !important
top: unset !important

View File

@@ -16,9 +16,9 @@ $color-calendar-range-compare: lighten($color-calendar-compare,10%)
#datepicker
.input-selected
margin: 0
#date-start.input-selected, #date-end.input-selected,
#date-start.input-selected, #date-end.input-selected
border: solid 3px $color-calendar-day-selected
#date-start-compare.input-selected, #date-end-compare.input-selected,
#date-start-compare.input-selected, #date-end-compare.input-selected
border: solid 3px $color-calendar-day-selected-compare
div#datepicker-form
#date-range

View File

@@ -8,72 +8,72 @@ $namespace: "growl"
$duration: 0.4s
#growls
z-index: 50000
position: fixed
&.default
top: 100px
@include right(10px)
&.tl
top: 10px
@include left(10px)
&.tr
top: 10px
@include right(10px)
&.bl
bottom: 10px
@include left(10px)
&.br
bottom: 10px
@include right(10px)
z-index: 50000
position: fixed
&.default
top: 100px
@include right(10px)
&.tl
top: 10px
@include left(10px)
&.tr
top: 10px
@include right(10px)
&.bl
bottom: 10px
@include left(10px)
&.br
bottom: 10px
@include right(10px)
.growl
opacity: 1
position: relative
@include border-radius(4px)
@include transition(all $duration ease-in-out)
opacity: 1
position: relative
@include border-radius(4px)
@include transition(all $duration ease-in-out)
&.#{$namespace}-incoming
opacity: 0.0
&.#{$namespace}-incoming
opacity: 0.0
&.#{$namespace}-outgoing
opacity: 0.0
&.#{$namespace}-outgoing
opacity: 0.0
&.#{$namespace}-small
width: 200px
padding: 5px
margin: 5px
&.#{$namespace}-medium
width: 250px
padding: 10px
margin: 10px
&.#{$namespace}-large
width: 300px
padding: 15px
margin: 15px
&.#{$namespace}-small
width: 200px
padding: 5px
margin: 5px
&.#{$namespace}-medium
width: 250px
padding: 10px
margin: 10px
&.#{$namespace}-large
width: 300px
padding: 15px
margin: 15px
&.#{$namespace}-default
color: #FFF
background: gray
&.#{$namespace}-error
color: white
background: rgba($brand-danger,0.8)
&.#{$namespace}-notice
color: white
background: rgba($brand-success,0.8)
&.#{$namespace}-warning
color: white
background: rgba($brand-warning,0.8)
.#{$namespace}-close
cursor: pointer
font-size: 14px
line-height: 18px
font-weight: normal
font-family: helvetica, verdana, sans-serif
@include float(right)
.#{$namespace}-title
font-size: 18px
line-height: 24px
.#{$namespace}-message
font-size: 14px
line-height: 18px
&.#{$namespace}-default
color: #FFF
background: gray
&.#{$namespace}-error
color: white
background: rgba($brand-danger,0.8)
&.#{$namespace}-notice
color: white
background: rgba($brand-success,0.8)
&.#{$namespace}-warning
color: white
background: rgba($brand-warning,0.8)
.#{$namespace}-close
cursor: pointer
font-size: 14px
line-height: 18px
font-weight: normal
font-family: helvetica, verdana, sans-serif
@include float(right)
.#{$namespace}-title
font-size: 18px
line-height: 24px
.#{$namespace}-message
font-size: 14px
line-height: 18px

View File

@@ -12,302 +12,302 @@ $spinnerSize: 32px
// MIXINS
@mixin prefix ( $property, $value )
-webkit-#{$property}: $value
-moz-#{$property}: $value
-ms-#{$property}: $value
-o-#{$property}: $value
#{$property}: $value
-webkit-#{$property}: $value
-moz-#{$property}: $value
-ms-#{$property}: $value
-o-#{$property}: $value
#{$property}: $value
@mixin transition( $value )
-webkit-transition: $value !important // important to override bootstrap
-moz-transition: $value !important
-ms-transition: $value !important
-o-transition: $value !important
transition: $value !important
-webkit-transition: $value !important // important to override bootstrap
-moz-transition: $value !important
-ms-transition: $value !important
-o-transition: $value !important
transition: $value !important
@mixin vendor-transform( $value )
@include prefix( transform, $value )
@include prefix( transform, $value )
@mixin transform-origin( $value )
@include prefix( transform-origin, $value )
@include prefix( transform-origin, $value )
@mixin buttonColor( $name, $color )
&[data-color=#{$name}]
background: $color
&:hover
background-color: lighten( $color, 5% )
&[data-color=#{$name}]
background: $color
&:hover
background-color: lighten( $color, 5% )
// BUTTON BASE
.ladda-button
position: relative
.ladda-spinner
position: absolute
z-index: 2
display: inline-block
width: $spinnerSize
height: $spinnerSize
top: 50%
margin-top: -$spinnerSize/2
opacity: 0
pointer-events: none
position: relative
.ladda-spinner
position: absolute
z-index: 2
display: inline-block
width: $spinnerSize
height: $spinnerSize
top: 50%
margin-top: -$spinnerSize/2
opacity: 0
pointer-events: none
.ladda-label
position: relative
z-index: 3
.ladda-label
position: relative
z-index: 3
.ladda-progress
position: absolute
width: 0
height: 100%
top: 0
background: rgba( 0, 0, 0, 0.2 )
visibility: hidden
opacity: 0
@include left(0)
@include transition( 0.1s linear all )
&[data-loading] .ladda-progress
opacity: 1
visibility: visible
.ladda-progress
position: absolute
width: 0
height: 100%
top: 0
background: rgba( 0, 0, 0, 0.2 )
visibility: hidden
opacity: 0
@include left(0)
@include transition( 0.1s linear all )
&[data-loading] .ladda-progress
opacity: 1
visibility: visible
// EASING
.ladda-button, .ladda-button .ladda-spinner, .ladda-button .ladda-label
@include transition( 0.3s cubic-bezier(0.175, 0.885, 0.320, 1.275) background-color )
@include transition( 0.3s cubic-bezier(0.175, 0.885, 0.320, 1.275) background-color )
.ladda-button[data-style=zoom-in],
.ladda-button[data-style=zoom-in] .ladda-spinner,
.ladda-button[data-style=zoom-in] .ladda-label,
.ladda-button[data-style=zoom-out],
.ladda-button[data-style=zoom-out] .ladda-spinner,
.ladda-button[data-style=zoom-out] .ladda-label
@include transition( 0.3s ease all )
@include transition( 0.3s ease all )
// EXPAND LEFT
.ladda-button[data-style=expand-right]
.ladda-spinner
@include right(14px)
&[data-size="s"] .ladda-spinner,
&[data-size="xs"] .ladda-spinner
@include right(4px)
&[data-loading]
@include padding-right(56px)
.ladda-spinner
opacity: 1
&[data-size="s"],
&[data-size="xs"]
@include padding-right(40px)
.ladda-spinner
@include right(14px)
&[data-size="s"] .ladda-spinner,
&[data-size="xs"] .ladda-spinner
@include right(4px)
&[data-loading]
@include padding-right(56px)
.ladda-spinner
opacity: 1
&[data-size="s"],
&[data-size="xs"]
@include padding-right(40px)
// EXPAND RIGHT
.ladda-button[data-style=expand-left]
.ladda-spinner
@include left(14px)
&[data-size="s"] .ladda-spinner,
&[data-size="xs"] .ladda-spinner
@include left(4px)
&[data-loading]
@include padding-left(56px)
.ladda-spinner
opacity: 1
&[data-size="s"],
&[data-size="xs"]
@include padding-left(40px)
.ladda-spinner
@include left(14px)
&[data-size="s"] .ladda-spinner,
&[data-size="xs"] .ladda-spinner
@include left(4px)
&[data-loading]
@include padding-left(56px)
.ladda-spinner
opacity: 1
&[data-size="s"],
&[data-size="xs"]
@include padding-left(40px)
// EXPAND UP
.ladda-button[data-style=expand-up]
overflow: hidden
.ladda-spinner
top: -$spinnerSize
@include margin-left(-$spinnerSize/2)
@include left(50%)
&[data-loading]
padding-top: 54px
.ladda-spinner
opacity: 1
top: 14px
margin-top: 0
&[data-size="s"],
&[data-size="xs"]
padding-top: 32px
.ladda-spinner
top: 4px
overflow: hidden
.ladda-spinner
top: -$spinnerSize
@include margin-left(-$spinnerSize/2)
@include left(50%)
&[data-loading]
padding-top: 54px
.ladda-spinner
opacity: 1
top: 14px
margin-top: 0
&[data-size="s"],
&[data-size="xs"]
padding-top: 32px
.ladda-spinner
top: 4px
// EXPAND DOWN
.ladda-button[data-style=expand-down]
overflow: hidden
.ladda-spinner
top: 62px
@include left(50%)
margin-left: -$spinnerSize/2
&[data-size="s"] .ladda-spinner,
&[data-size="xs"] .ladda-spinner
top: 40px
&[data-loading]
padding-bottom: 54px
.ladda-spinner
opacity: 1
&[data-size="s"]
&[data-size="xs"]
padding-bottom: 32px
overflow: hidden
.ladda-spinner
top: 62px
@include left(50%)
margin-left: -$spinnerSize/2
&[data-size="s"] .ladda-spinner,
&[data-size="xs"] .ladda-spinner
top: 40px
&[data-loading]
padding-bottom: 54px
.ladda-spinner
opacity: 1
&[data-size="s"]
&[data-size="xs"]
padding-bottom: 32px
// SLIDE LEFT
.ladda-button[data-style=slide-left]
overflow: hidden
.ladda-label
position: relative
.ladda-spinner
@include left(100%)
@include margin-left(-$spinnerSize/2)
&[data-loading]
.ladda-label
opacity: 0
@include left(-100%)
.ladda-spinner
opacity: 1
@include left(50%)
overflow: hidden
.ladda-label
position: relative
.ladda-spinner
@include left(100%)
@include margin-left(-$spinnerSize/2)
&[data-loading]
.ladda-label
opacity: 0
@include left(-100%)
.ladda-spinner
opacity: 1
@include left(50%)
// SLIDE RIGHT
.ladda-button[data-style=slide-right]
overflow: hidden
.ladda-label
position: relative
.ladda-spinner
@include right(100%)
@include margin-left(-$spinnerSize/2)
&[data-loading]
.ladda-label
opacity: 0
@include left(100%)
.ladda-spinner
opacity: 1
@include left(50%)
overflow: hidden
.ladda-label
position: relative
.ladda-spinner
@include right(100%)
@include margin-left(-$spinnerSize/2)
&[data-loading]
.ladda-label
opacity: 0
@include left(100%)
.ladda-spinner
opacity: 1
@include left(50%)
// SLIDE UP
.ladda-button[data-style=slide-up]
overflow: hidden
.ladda-label
position: relative
.ladda-spinner
margin-top: 1em
@include left(50%)
@include margin-left(-$spinnerSize/2)
&[data-loading]
.ladda-label
opacity: 0
top: -1em
.ladda-spinner
opacity: 1
margin-top: -$spinnerSize/2
overflow: hidden
.ladda-label
position: relative
.ladda-spinner
margin-top: 1em
@include left(50%)
@include margin-left(-$spinnerSize/2)
&[data-loading]
.ladda-label
opacity: 0
top: -1em
.ladda-spinner
opacity: 1
margin-top: -$spinnerSize/2
// SLIDE DOWN
.ladda-button[data-style=slide-down]
overflow: hidden
.ladda-label
position: relative
.ladda-spinner
margin-top: -2em
@include margin-left(-$spinnerSize/2)
@include left(50%)
&[data-loading]
.ladda-label
opacity: 0
top: 1em
.ladda-spinner
opacity: 1
margin-top: -$spinnerSize/2
overflow: hidden
.ladda-label
position: relative
.ladda-spinner
margin-top: -2em
@include margin-left(-$spinnerSize/2)
@include left(50%)
&[data-loading]
.ladda-label
opacity: 0
top: 1em
.ladda-spinner
opacity: 1
margin-top: -$spinnerSize/2
// ZOOM-OUT
.ladda-button[data-style=zoom-out]
overflow: hidden
.ladda-spinner
@include left(50%)
@include margin-left(-$spinnerSize/2)
@include vendor-transform( scale( 2.5 ) )
.ladda-label
position: relative
display: inline-block
&[data-loading] .ladda-label
opacity: 0
@include vendor-transform( scale( 0.5 ) )
&[data-loading] .ladda-spinner
opacity: 1
@include vendor-transform( none )
overflow: hidden
.ladda-spinner
@include left(50%)
@include margin-left(-$spinnerSize/2)
@include vendor-transform( scale( 2.5 ) )
.ladda-label
position: relative
display: inline-block
&[data-loading] .ladda-label
opacity: 0
@include vendor-transform( scale( 0.5 ) )
&[data-loading] .ladda-spinner
opacity: 1
@include vendor-transform( none )
// ZOOM-IN
.ladda-button[data-style=zoom-in]
overflow: hidden
.ladda-spinner
@include margin-left(-$spinnerSize/2)
@include left(50%)
@include vendor-transform( scale( 0.2 ) )
.ladda-label
position: relative
display: inline-block
&[data-loading] .ladda-label
opacity: 0
@include vendor-transform( scale( 2.2 ) )
&[data-loading] .ladda-spinner
opacity: 1
@include vendor-transform( none )
overflow: hidden
.ladda-spinner
@include margin-left(-$spinnerSize/2)
@include left(50%)
@include vendor-transform( scale( 0.2 ) )
.ladda-label
position: relative
display: inline-block
&[data-loading] .ladda-label
opacity: 0
@include vendor-transform( scale( 2.2 ) )
&[data-loading] .ladda-spinner
opacity: 1
@include vendor-transform( none )
// CONTRACT
.ladda-button[data-style=contract]
overflow: hidden
width: 100px
.ladda-spinner
@include left(50%)
@include margin-left(-16px)
overflow: hidden
width: 100px
.ladda-spinner
@include left(50%)
@include margin-left(-16px)
.ladda-button[data-style=contract][data-loading]
border-radius: 50%
width: 52px
.ladda-label
opacity: 0
.ladda-spinner
opacity: 1
border-radius: 50%
width: 52px
.ladda-label
opacity: 0
.ladda-spinner
opacity: 1
// OVERLAY
.ladda-button[data-style=contract-overlay]
overflow: hidden
width: 100px
@include ltr
box-shadow: 0px 0px 0px 3000px rgba(0,0,0,0)
@include rtl
box-shadow: 0px 3000px 0px 0px rgba(0,0,0,0)
.ladda-spinner
@include left(50%)
@include margin-left(-16px)
&[data-loading]
border-radius: 50%
width: 52px
@include ltr
box-shadow: 0px 0px 0px 3000px rgba(0,0,0,0.8)
@include rtl
box-shadow: 0px 3000px 0px 0px rgba(0,0,0,0.8)
.ladda-label
opacity: 0
.ladda-spinner
opacity: 1
overflow: hidden
width: 100px
@include ltr
box-shadow: 0px 0px 0px 3000px rgba(0,0,0,0)
@include rtl
box-shadow: 0px 3000px 0px 0px rgba(0,0,0,0)
.ladda-spinner
@include left(50%)
@include margin-left(-16px)
&[data-loading]
border-radius: 50%
width: 52px
@include ltr
box-shadow: 0px 0px 0px 3000px rgba(0,0,0,0.8)
@include rtl
box-shadow: 0px 3000px 0px 0px rgba(0,0,0,0.8)
.ladda-label
opacity: 0
.ladda-spinner
opacity: 1
.ladda-button
&[disabled],
&[data-loading]
border-color: rgba( 0, 0, 0, 0.07 )
cursor: default
background-color: #999
&:hover
cursor: default
background-color: #999
&[data-size=xs]
padding: 4px 8px
.ladda-label
font-size: 0.7em
&[data-size=s]
padding: 6px 10px
.ladda-label
font-size: 0.9em
&[data-size=l] .ladda-label
font-size: 1.2em
&[data-size=xl] .ladda-label
font-size: 1.5em
&[disabled],
&[data-loading]
border-color: rgba( 0, 0, 0, 0.07 )
cursor: default
background-color: #999
&:hover
cursor: default
background-color: #999
&[data-size=xs]
padding: 4px 8px
.ladda-label
font-size: 0.7em
&[data-size=s]
padding: 6px 10px
.ladda-label
font-size: 0.9em
&[data-size=l] .ladda-label
font-size: 1.2em
&[data-size=xl] .ladda-label
font-size: 1.5em

View File

@@ -90,7 +90,7 @@
td.actions
@include text-align(right)
@include padding-right(5px)
th.actions .btn,
th.actions .btn
margin-bottom: 4px !important
tr.myDragClass

View File

@@ -36,6 +36,7 @@
</a>
{/if}
</div>
{if $can_edit}
<div class="well">
<form action="{$link->getAdminLink('AdminCustomerThreads')|escape:'html':'UTF-8'}&amp;viewcustomer_thread&amp;id_customer_thread={$id_customer_thread|intval}" method="post" enctype="multipart/form-data" class="form-horizontal">
{foreach $actions as $action}
@@ -48,6 +49,7 @@
</button>
</form>
</div>
{/if}
<div class="row">
<div class="message-item-initial media">
<span class="avatar-md pull-left"><i class="icon-user icon-3x"></i></span>
@@ -97,6 +99,7 @@
{/foreach}
</div>
</div>
{if $can_edit}
<div class="panel">
<form action="{$link->getAdminLink('AdminCustomerThreads')|escape:'html':'UTF-8'}&amp;id_customer_thread={$thread->id|intval}&amp;viewcustomer_thread" method="post" enctype="multipart/form-data" class="form-horizontal">
<h3>{l s="Your answer to"} {if isset($customer->firstname)}{$customer->firstname|escape:'html':'UTF-8'} {$customer->lastname|escape:'html':'UTF-8'} {else} {$thread->email}{/if}</h3>
@@ -125,7 +128,7 @@
</div>
</form>
</div>
{/if}
{if count($timeline_items)}
<div class="panel">
<h3>

View File

@@ -48,21 +48,65 @@
function modules_management(action)
{
var modules = document.getElementsByName('modules');
var module_list = '';
var module_list = [];
for (var i = 0; i < modules.length; i++)
{
if (modules[i].checked == true)
if (modules[i].checked)
{
rel = modules[i].getAttribute('data-rel');
var rel = modules[i].getAttribute('data-rel');
if (rel != "false" && action == "uninstall")
{
if (!confirm(rel))
return false;
}
module_list += '|'+modules[i].value;
module_list.push(modules[i].value);
}
}
document.location.href=currentIndex+'&token='+token+'&'+action+'='+module_list.substring(1, module_list.length);
module_list = encodeURIComponent(module_list.join('|'));
if (action == 'enable' || action == 'disable') {
var type = action == 'disable' ? 0 : 1;
document.location.href = currentIndex+'&token='+token+'&enable='+type+'&module_name='+module_list;
return false;
}
document.location.href = currentIndex+'&token='+token+'&'+action+'='+module_list;
return false;
}
function filter_modules_by_name(table, moduleName)
{
var moduleNames = moduleName.split('|');
var filteredNames = [];
for (var i = 0; i < moduleNames.length; i++) {
moduleNames[i] = $.trim(moduleNames[i]);
if (moduleNames[i] !== '') {
filteredNames.push(moduleNames[i].toLowerCase());
}
}
if (!filteredNames.length) {
return;
}
if (filteredNames.length === 1) {
$.uiTableFilter(table, filteredNames[0]);
return;
}
table.find('tbody tr').each(function() {
var rowText = $(this).text().toLowerCase();
var isMatch = false;
for (var i = 0; i < filteredNames.length; i++) {
if (rowText.indexOf(filteredNames[i]) !== -1) {
isMatch = true;
break;
}
}
$(this).toggle(isMatch);
});
}
$('document').ready( function() {
@@ -71,7 +115,7 @@
$.uiTableFilter($('#moduleContainer').find('table'), anchor);
if (module_name != '')
$.uiTableFilter($('#moduleContainer').find('table'), module_name);
filter_modules_by_name($('#moduleContainer').find('table'), module_name);
$('#moduleQuicksearch').on('keyup', function(){
val = this.value;

View File

@@ -190,6 +190,19 @@
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li>
<a href="#" onclick="modules_management('enable')">
<i class="icon-power-off text-success"></i>&nbsp;
{l s='Enable selection'}
</a>
</li>
<li>
<a href="#" onclick="modules_management('disable')">
<i class="icon-power-off text-danger"></i>&nbsp;
{l s='Disable selection'}
</a>
</li>
<li class="divider"></li>
<li>
<a href="#" onclick="modules_management('install')">
<i class="icon-plus-sign-alt"></i>&nbsp;

View File

@@ -36,7 +36,6 @@
class="form-control {if isset($input_class)}{$input_class} {/if}"
name="{$input_name}_{$language.id_lang}"
value="{$input_value[$language.id_lang]|default:''|escape:'html'}"
onkeyup="if (isArrowKey(event)) return ;updateFriendlyURL();"
onblur="updateLinkRewrite();"
{if isset($required)} required="required"{/if}
{if isset($maxchar)} data-maxchar="{$maxchar}"{/if}

View File

@@ -27,7 +27,7 @@
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="meta_title" type="default" multilang="true"}</span></div>
<label class="control-label col-lg-2" for="meta_title_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Public title for the product\'s page, and for search engines. Leave blank to use the room type name.'} {l s='The number of remaining characters is displayed to the left of the field.'}">
title="{l s='Title shown in search results. Leave blank to use the room type name.'}">
{l s='Meta title'}
</span>
</label>
@@ -36,7 +36,7 @@
languages=$languages
input_name='meta_title'
input_value=$product->meta_title
maxchar=70
maxchar=128
}
</div>
</div>
@@ -44,7 +44,7 @@
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="meta_description" type="default" multilang="true"}</span></div>
<label class="control-label col-lg-2" for="meta_description_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='This description will appear in search engines. You need a single sentence, shorter than 160 characters (including spaces).'}">
title="{l s='This description will appear in search engines. You need a single sentence, shorter than 255 characters (including spaces). Leave blank to use the room type short description.'}">
{l s='Meta description'}
</span>
</label>
@@ -53,7 +53,7 @@
languages=$languages
input_name='meta_description'
input_value=$product->meta_description
maxchar=160
maxchar=255
}
</div>
</div>
@@ -91,16 +91,11 @@
<button type="button" class="btn btn-default" id="generate-friendly-url" onmousedown="updateFriendlyURLByName();"><i class="icon-random"></i> {l s='Generate'}</button>
</div>
</div>
<div class="row">
<div class="col-lg-9 col-lg-offset-3">
{foreach from=$languages item=language}
<div class="alert alert-warning translatable-field lang-{$language.id_lang}">
<i class="icon-link"></i> {l s='The product link will look like this:'}<br/>
<strong>{if isset($rewritten_links[$language.id_lang][0])}{$rewritten_links[$language.id_lang][0]|escape:'html':'UTF-8'}{/if}<span id="friendly-url_{$language.id_lang}">{if isset($product->id)}{$product->link_rewrite[$language.id_lang]|escape:'html':'UTF-8'}{/if}</span>{if isset($rewritten_links[$language.id_lang][1])}{$rewritten_links[$language.id_lang][1]|escape:'html':'UTF-8'}{/if}</strong>
</div>
{/foreach}
</div>
</div>
{include file="seo_preview.tpl"
languages = $languages
preview_link = $rewritten_links|default:''
inputs = ['meta_title'=>$product->meta_title ,'meta_description' => $product->meta_description,'link_rewrite' => $product->link_rewrite, 'name' => $product->name, 'description_short' => $product->description_short]
}
<div class="panel-footer">
<a href="{$link->getAdminLink('AdminNormalProducts')|escape:'html':'UTF-8'}{if isset($smarty.request.page) && $smarty.request.page > 1}&amp;submitFilterproduct={$smarty.request.page|intval}{/if}" class="btn btn-default"><i class="process-icon-cancel"></i> {l s='Cancel'}</a>
<button type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> {l s='Save'}</button>
@@ -110,4 +105,12 @@
<script type="text/javascript">
if (tabs_manager.allow_hide_other_languages)
hideOtherLanguage({$default_form_language});
// Recalculate autosize heights when language is switched (hidden textareas gain correct width)
(function() {
var _orig = window.hideOtherLanguage;
window.hideOtherLanguage = function(id) {
_orig && _orig.call(this, id);
$(window).trigger('resize.autosize');
};
})();
</script>

View File

@@ -31,7 +31,7 @@
<span class="text-count-down">{$maxchar|intval}</span>
</span>
{/if}
<textarea id="{$input_name}_{$language.id_lang}" name="{$input_name}_{$language.id_lang}" class="{if isset($class)}{$class}{else}textarea-autosize{/if}"{if isset($maxlength) && $maxlength} maxlength="{$maxlength|intval}"{/if}{if isset($maxchar) && $maxchar} data-maxchar="{$maxchar|intval}"{/if}>{if isset($input_value[$language.id_lang])}{$input_value[$language.id_lang]|htmlentitiesUTF8}{/if}</textarea>
<textarea id="{$input_name}_{$language.id_lang}" name="{$input_name}_{$language.id_lang}" class="{if isset($class)}{$class}{else}textarea-autosize{/if}" rows="1"{if isset($maxlength) && $maxlength} maxlength="{$maxlength|intval}"{/if}{if isset($maxchar) && $maxchar} data-maxchar="{$maxchar|intval}"{/if}>{if isset($input_value[$language.id_lang])}{$input_value[$language.id_lang]|htmlentitiesUTF8}{/if}</textarea>
<span class="counter" data-max="{if isset($max)}{$max|intval}{/if}{if isset($maxlength)}{$maxlength|intval}{/if}{if !isset($max) && !isset($maxlength)}none{/if}"></span>
{if isset($maxchar) && $maxchar}
</div>
@@ -61,6 +61,10 @@
{/foreach}
});
{/if}
$(".textarea-autosize").autosize();
$(".textarea-autosize").each(function() {
var $ta = $(this), val = $ta.val();
$ta.val('').autosize();
if (val) { $ta.val(val).trigger('input'); }
});
</script>

View File

@@ -32,9 +32,7 @@
{if isset($selectedRoomDemands) && $selectedRoomDemands}
<li role="presentation" class="active"><a href="#room_type_demands_desc" aria-controls="facilities" role="tab" data-toggle="tab">{l s='Facilities'}</a></li>
{/if}
{if isset($serviceProducts) && $serviceProducts}
<li role="presentation" {if !isset($selectedRoomDemands) || !$selectedRoomDemands}class="active"{/if}><a href="#room_type_service_product_desc" aria-controls="services" role="tab" data-toggle="tab">{l s='Services'}</a></li>
{/if}
<li role="presentation" {if !isset($selectedRoomDemands) || !$selectedRoomDemands}class="active"{/if}><a href="#room_type_service_product_desc" aria-controls="services" role="tab" data-toggle="tab">{l s='Services'}</a></li>
</ul>
<div class="tab-content">
{if isset($selectedRoomDemands) && $selectedRoomDemands}

View File

@@ -1572,6 +1572,7 @@
id_room: idRoom,
id_cart: idCart,
id_product: idProduct,
id_customer: id_customer,
id_hotel_cart_booking: idHotelCartBooking,
action: 'getRoomTypeCartDemands',
ajax: true
@@ -1877,7 +1878,7 @@
<i class="icon-user"></i>
{l s='Customer'}
</div>
<div id="search-customer-form-group" class="form-group">
<div id="search-customer-form-group" {if isset($cart->id_customer) && $cart->id_customer && isset($customer) && $customer }style="display:none;"{/if} class="form-group">
<label class="control-label col-lg-3">
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s='Search for an existing customer by typing the first letters of his/her name.'}">
{l s='Search for a customer'}
@@ -1904,7 +1905,26 @@
</div>
</div>
<div class="row">
<div id="customers"></div>
<div id="customers">
{if isset($cart->id_customer) && $cart->id_customer && isset($customer) && $customer }
<div class="customerCard col-lg-4 selected-customer">
<div class="panel">
<div class="panel-heading">
<i class="icon-ok text-success"></i>{$customer->firstname} {$customer->lastname} <span class="pull-right">#{$customer->id}</span>
</div>
<span>{$customer->email}</span><br>
<span class="text-muted"></span><br>
<div class="panel-footer">
<a href="{$link->getAdminLink('AdminCustomers')}&id_customer={$customer->id}&viewcustomer&liteDisplaying=1" class="btn btn-default fancybox">
<i class="icon-search"></i> Details </a>
<button type="button" data-id_cart="6" data-customer="2" class="btn btn-default pull-right change-customer">
<i class="icon-refresh"></i>&nbsp;Change
</button>
</div>
</div>
</div>
{/if}
</div>
</div>
{*<div id="carts">
<button type="button" id="show_old_carts" class="btn btn-default pull-right" data-toggle="collapse" data-target="#old_carts_orders">
@@ -1962,7 +1982,7 @@
</div>
{include file='controllers/orders/_current_cart_details_data.tpl'}
<form class="form-horizontal" action="{$link->getAdminLink('AdminOrders')|escape:'html':'UTF-8'}&amp;addorder=1&amp;cart_id={$cart->id}" method="post" style="display:none" id="cart_detail_form">
<form class="form-horizontal" action="{$link->getAdminLink('AdminOrders')|escape:'html':'UTF-8'}&amp;addorder=1&amp;cart_id={$cart->id}" method="post" {if !isset($customer) && !$customer }style="display:none;"{/if} id="cart_detail_form">
<div class="panel" id="products_part" style="display:none;">
<div class="panel-heading">
<i class="icon-shopping-cart"></i>
@@ -2317,17 +2337,14 @@
<label class="control-label col-lg-3" for="order_message">{l s='Order message'}</label>
<div class="col-lg-6">
<textarea name="order_message" id="order_message" rows="3" cols="45"></textarea>
</div>
</div>
<div class="form-group col-lg-12">
<span class="col-lg-3"></span>
<p class="checkbox col-lg-6">
<p class="checkbox">
<label class="control-label" for="visibility">
<input type="checkbox" name="visibility" id="visibility" value="1" />
{l s='Display Message to Customer?'}
</label>
</p>
</div>
</div>
</div>
<div class="form-group" {if $order_total <= 0}style="display: none;"{/if}>
{if !$PS_CATALOG_MODE}
<div class="col-lg-9 col-lg-offset-3">
@@ -2430,7 +2447,6 @@
</form>
{strip}
{addJsDef max_child_age=$max_child_age}
{addJsDef max_child_in_room=$max_child_in_room}
{addJsDefL name='select_age_txt'}{l s='Select age' js=1}{/addJsDefL}
{addJsDefL name='under_1_age'}{l s='Under 1' js=1}{/addJsDefL}
{addJsDefL name='room_txt'}{l s='Room' js=1}{/addJsDefL}

View File

@@ -148,7 +148,7 @@
{if isset($refundReqBookings) && $refundReqBookings && $data.id|in_array:$refundReqBookings && $data.is_refunded}
<span class="badge badge-danger">{if $data.is_cancelled}{l s='Cancelled'}{else}{l s='Refunded'}{/if}</span>
{elseif $can_edit}
<a class="open_room_status_form btn btn-default" href="#" data-id_hotel_booking_detail="{$data['id']}" data-id_order="{$data['id_order']}" data-id_status="{$data['id_status']}" data-id_room="{$data['id_room']}" data-date_from="{$data['date_from']|date_format:"%Y-%m-%d"}" data-date_to="{$data['date_to']|date_format:"%Y-%m-%d"}" data-check_in_time="{$data['check_in_time']}" data-check_out_time="{$data['check_out_time']}">
<a class="open_room_status_form btn btn-default" href="#" data-id_hotel_booking_detail="{$data['id']}" data-id_order="{$data['id_order']}" data-id_status="{$data['id_status']}" data-id_room="{$data['id_room']}" data-date_from="{$data['date_from']|date_format:"%Y-%m-%d"}" data-date_to="{$data['date_to']|date_format:"%Y-%m-%d"}" data-check_in_time="{$data['check_in_time']}" data-check_out_time="{$data['check_out_time']}" data-check_in="{$data['check_in']}" data-check_out="{$data['check_out']}">
<i class="icon-pencil"></i> {l s='Edit'}
</a>
{/if}
@@ -269,9 +269,14 @@
<input type="hidden" name="id_order" value="{$order->id}" />
</div>
<div class="col-lg-3">
<button type="submit" name="submitState" class="btn btn-primary">
{l s='Update status'}
</button>
<div class="btn-group">
<button type="submit" name="submitState" class="btn btn-primary">
{l s='Update status'}
</button>
<button type="button" id="order_status_disable_info" class="btn btn-default" data-toggle="modal" data-target="#order_status_disable_reason" title="{l s='Click here to see why certain statuses can’t be selected'}" aria-label="{l s='Why are some staClick here to see why certain statuses can’t be selected'}">
<i class="icon-info-circle"></i>
</button>
</div>
</div>
</div>
</form>
@@ -712,7 +717,7 @@
{if isset($messages) && $messages}
<div class="panel order-notes">
<div class="panel-heading">
<i class="icon-undo"></i> &nbsp;{l s='Order Private Notes'}
<i class="icon-undo"></i> &nbsp;{l s='Order Notes'}
</div>
<div class="panel-content">
{foreach from=$messages item=message name=customerMessage}
@@ -725,11 +730,11 @@
<span>{$message['elastname']|escape:'html':'UTF-8'}{else}{$message['cfirstname']|escape:'html':'UTF-8'} {$message['clastname']|escape:'html':'UTF-8'}</span>
{/if},
<span class="message-date">&nbsp;<i class="icon-calendar"></i>
{dateFormat date=$message['date_add']}
{dateFormat date=$message.date_add full=1}
</span>
{if ($message['private'] == 1)}
{* {if ($message['private'] == 1)}
<span class="badge badge-info">{l s='Private'}</span>
{/if}
{/if} *}
</p>
</div>
{if !$smarty.foreach.customerMessage.last}<hr/>{/if}
@@ -1307,7 +1312,30 @@
{/if}
</div>
</div>
{* Css for handling order disable status modal *}
<style type="text/css">
#order-status-disable-reason-body p { margin: 0 0 15px; }
#order-status-disable-reason-body p:last-child { margin-bottom: 0; }
</style>
<div class="modal fade" id="order_status_disable_reason" tabindex="-1" role="dialog" aria-labelledby="order_status_disable_reason_label">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="{l s='Close'}"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="order_status_disable_reason_label"><i class="icon icon-ban"></i> {l s='Order Status Disable Criteria'}</h4>
</div>
<div class="modal-body" id="order-status-disable-reason-body">
<p><strong>{l s='Refunded:'}</strong> {l s='Disabled when total paid amount is 0 and no discount is applied.'}</p>
<p><strong>{l s='Cancelled:'}</strong> {l s='Disabled when the paid amount is greater than 0 or when discounts are applied.'}</p>
<p><strong>{l s='Overbooking:'}</strong> {l s='Disabled when the order has no overbooked rooms.'}</p>
<p><strong>{l s='Current:'}</strong> {l s='The current order status cannot be selected again.'}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{l s='Close'}</button>
</div>
</div>
</div>
</div>
{strip}
{addJsDefL name=no_rm_avail_txt}{l s='No room available.' js=1}{/addJsDefL}
{addJsDefL name=no_realloc_rm_avail_txt}{l s='No room available for reallocation.' js=1}{/addJsDefL}
@@ -1340,7 +1368,6 @@
{addJsDefL name='invalid_occupancy_txt'}{l s='Invalid occupancy(adults/children) found.' js=1}{/addJsDefL}
{addJsDefL name='select_room_txt'}{l s='Select room' js=1}{/addJsDefL}
{addJsDef max_child_age=$max_child_age|escape:'quotes':'UTF-8'}
{addJsDef max_child_in_room=$max_child_in_room|escape:'quotes':'UTF-8'}
{addJsDef ROOM_STATUS_CHECKED_IN=$ROOM_STATUS_CHECKED_IN|escape:'quotes':'UTF-8'}
{addJsDef ROOM_STATUS_CHECKED_OUT=$ROOM_STATUS_CHECKED_OUT|escape:'quotes':'UTF-8'}
{addJsDef ALLOTMENT_MANUAL=$ALLOTMENT_MANUAL|escape:'quotes':'UTF-8'}
@@ -1351,4 +1378,4 @@
{addJsDefL name=txt_booking_document_delete_success}{l s='Document deleted successfully.' js=1}{/addJsDefL}
{addJsDefL name='error_found_txt'}{l s='Errors found' js=1}{/addJsDefL}
{/strip}
{/block}
{/block}

View File

@@ -128,6 +128,12 @@
</div>
{/if}
</div>
<div class="form-group row">
<div class="col-sm-12">
<label class="control-label">{l s='Remark'}</label>
<textarea class="form-control room_remark" name="message" maxlength="250"></textarea>
</div>
</div>
{if isset($invoices_collection) && sizeof($invoices_collection)}
<div class="form-group" style="display: none;">

View File

@@ -0,0 +1,55 @@
{*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a newer
* versions in the future. If you wish to customize this module for your needs
* please refer to https://store.webkul.com/customisation-guidelines for more information.
*
* @author Webkul IN
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*}
<div class="modal-body">
<input type="hidden" name="id_product" value="{$id_product|intval}">
<input type="hidden" name="id_order_detail" value="{$id_order_detail|intval}">
<input type="hidden" name="id_hotel" value="{$id_hotel|intval}">
<input type="hidden" name="id_room" value="{$id_room|intval}">
<input type="hidden" name="id_htl_booking" value="{$id_htl_booking|intval}">
<input type="hidden" name="id_order" value="{$id_order|intval}">
<input type="hidden" name="date_from" value="{$date_from|escape:'html':'UTF-8'}">
<input type="hidden" name="date_to" value="{$date_to|escape:'html':'UTF-8'}">
<div class="form-group">
<div class="form-group" id="remarkGroup">
<label class="control-label required" for="room_remark">
{l s='Remark'}
</label>
<textarea id="room_remark" class="form-control" name="message"
placeholder="{l s='Enter remark for room deletion'}" maxlength="250"></textarea>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-close" data-dismiss="modal">{l s='Close'}</button>
<button type="button" id="submitRoomDelete" class="btn btn-danger">
<i class="icon icon-trash"></i>&nbsp;{l s="Delete Room"}
</button>
</div>
<script>
$(document).ready(function() {
$('#room_remark').on('input', function() {
if ($(this).val().trim() !== '') {
$('#remarkGroup').removeClass('has-error');
}
});
});
</script>

View File

@@ -139,6 +139,12 @@
</div>
</div>
</div>
<div class="row form-group">
<div class="col-sm-12">
<label class="control-label">{l s='Remark'}</label>
<textarea class="form-control room_remark" name="message" maxlength="250"></textarea>
</div>
</div>
<div class="product_invoice" style="display: none;">
<select name="product_invoice" class="edit_product_invoice">
{foreach from=$invoices_collection item=invoice}
@@ -152,4 +158,4 @@
<div class="modal-footer">
<button type="button" id="submitRoomChange" class="btn btn-primary"><i class="icon icon-bed"></i> &nbsp;{l s="Update Rooms"}</button>
</div>
</div>
</div>

View File

@@ -95,6 +95,12 @@
</div>
<p class="error_text" id="realloc_sel_rm_err_p"></p>
</div>
<div class="row form-group">
<div class="col-sm-12">
<label class="control-label">{l s='Remark'}</label>
<textarea class="form-control room_remark" name="message" maxlength="250"></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-close" data-dismiss="modal">{l s="Close"}</button>
@@ -139,6 +145,12 @@
</div>
</div>
</div>
<div class="row form-group">
<div class="col-sm-12">
<label class="control-label">{l s='Remark'}</label>
<textarea class="form-control room_remark" name="message" maxlength="250"></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-close" data-dismiss="modal">{l s="Close"}</button>

View File

@@ -30,7 +30,7 @@
{/foreach}
</select>
</div>
<div class="form-group" style="display:none;">
<div class="form-group" {if $current_room_status == $ROOM_STATUS_ALLOTED}style="display:none;"{/if}>
<label class="control-label">{l s='Date'}</label>
<div class="input-group">
<input type="text" name="status_date" class="room_status_date wk-input-date" value="" />
@@ -54,4 +54,4 @@
<img src='{$loaderImg}' class="loading-img"/>
</div>
{/if}
</div>
</div>

View File

@@ -218,6 +218,7 @@
$('.product-tab-content').on('displayed', function(e) {
$('#toolbar-footer').appendTo($(this).children('.product-tab'));
$(window).trigger('resize.autosize');
});
});

View File

@@ -104,7 +104,7 @@
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="name" type="default" multilang="true"}</span></div>
<label class="control-label col-lg-2 required" id="name" for="name_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip" title="{l s='Write the name of the Room Type for ex. Delux, Executive etc.'} {l s='Invalid characters:'} &lt;&gt;;=#{}">
{l s='Room Type'}
{l s='Name'}
</span>
</label>
<div class="col-lg-5">

View File

@@ -39,7 +39,6 @@
class="form-control {if isset($input_class)}{$input_class} {/if}"
name="{$input_name}_{$language.id_lang}"
value="{$input_value[$language.id_lang]|default:''|escape:'html'}"
onkeyup="if (isArrowKey(event)) return ;updateFriendlyURL();"
onblur="updateLinkRewrite();"
{if isset($required)} required="required"{/if}
{if isset($maxchar)} data-maxchar="{$maxchar}"{/if}

View File

@@ -30,7 +30,7 @@
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="meta_title" type="default" multilang="true"}</span></div>
<label class="control-label col-lg-2" for="meta_title_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Public title for the product\'s page, and for search engines. Leave blank to use the room type name.'} {l s='The number of remaining characters is displayed to the left of the field.'}">
title="{l s='Title shown in search results. Leave blank to use the room type name.'}">
{l s='Meta title'}
</span>
</label>
@@ -39,7 +39,7 @@
languages=$languages
input_name='meta_title'
input_value=$product->meta_title
maxchar=70
maxchar=128
}
</div>
</div>
@@ -47,7 +47,7 @@
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="meta_description" type="default" multilang="true"}</span></div>
<label class="control-label col-lg-2" for="meta_description_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='This description will appear in search engines. You need a single sentence, shorter than 160 characters (including spaces).'}">
title="{l s='This description will appear in search engines. You need a single sentence, shorter than 255 characters (including spaces). Leave blank to use the room type short description.'}">
{l s='Meta description'}
</span>
</label>
@@ -56,7 +56,7 @@
languages=$languages
input_name='meta_description'
input_value=$product->meta_description
maxchar=160
maxchar=255
}
</div>
</div>
@@ -94,16 +94,11 @@
<button type="button" class="btn btn-default" id="generate-friendly-url" onmousedown="updateFriendlyURLByName();"><i class="icon-random"></i> {l s='Generate'}</button>
</div>
</div>
<div class="row">
<div class="col-lg-9 col-lg-offset-3">
{foreach from=$languages item=language}
<div class="alert alert-warning translatable-field lang-{$language.id_lang}">
<i class="icon-link"></i> {l s='The product link will look like this:'}<br/>
<strong>{if isset($rewritten_links[$language.id_lang][0])}{$rewritten_links[$language.id_lang][0]|escape:'html':'UTF-8'}{/if}<span id="friendly-url_{$language.id_lang}">{if isset($product->id)}{$product->link_rewrite[$language.id_lang]|escape:'html':'UTF-8'}{/if}</span>{if isset($rewritten_links[$language.id_lang][1])}{$rewritten_links[$language.id_lang][1]|escape:'html':'UTF-8'}{/if}</strong>
</div>
{/foreach}
</div>
</div>
{include file="seo_preview.tpl"
languages = $languages
preview_link = $rewritten_links|default:''
inputs = ['meta_title'=>$product->meta_title ,'meta_description' => $product->meta_description,'link_rewrite' => $product->link_rewrite, 'name' => $product->name, 'description_short' => $product->description_short]
}
<div class="panel-footer">
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}{if isset($smarty.request.page) && $smarty.request.page > 1}&amp;submitFilterproduct={$smarty.request.page|intval}{/if}" class="btn btn-default"><i class="process-icon-cancel"></i> {l s='Cancel'}</a>
<button type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> {l s='Save'}</button>
@@ -113,4 +108,12 @@
<script type="text/javascript">
if (tabs_manager.allow_hide_other_languages)
hideOtherLanguage({$default_form_language});
// Recalculate autosize heights when language is switched (hidden textareas gain correct width)
(function() {
var _orig = window.hideOtherLanguage;
window.hideOtherLanguage = function(id) {
_orig && _orig.call(this, id);
$(window).trigger('resize.autosize');
};
})();
</script>

View File

@@ -34,7 +34,7 @@
<span class="text-count-down">{$maxchar|intval}</span>
</span>
{/if}
<textarea id="{$input_name}_{$language.id_lang}" name="{$input_name}_{$language.id_lang}" class="{if isset($class)}{$class}{else}textarea-autosize{/if}"{if isset($maxlength) && $maxlength} maxlength="{$maxlength|intval}"{/if}{if isset($maxchar) && $maxchar} data-maxchar="{$maxchar|intval}"{/if}>{if isset($input_value[$language.id_lang])}{$input_value[$language.id_lang]|htmlentitiesUTF8}{/if}</textarea>
<textarea id="{$input_name}_{$language.id_lang}" name="{$input_name}_{$language.id_lang}" class="{if isset($class)}{$class}{else}textarea-autosize{/if}" rows="1"{if isset($maxlength) && $maxlength} maxlength="{$maxlength|intval}"{/if}{if isset($maxchar) && $maxchar} data-maxchar="{$maxchar|intval}"{/if}>{if isset($input_value[$language.id_lang])}{$input_value[$language.id_lang]|htmlentitiesUTF8}{/if}</textarea>
<span class="counter" data-max="{if isset($max)}{$max|intval}{/if}{if isset($maxlength)}{$maxlength|intval}{/if}{if !isset($max) && !isset($maxlength)}none{/if}"></span>
{if isset($maxchar) && $maxchar}
</div>
@@ -64,6 +64,10 @@
{/foreach}
});
{/if}
$(".textarea-autosize").autosize();
$(".textarea-autosize").each(function() {
var $ta = $(this), val = $ta.val();
$ta.val('').autosize();
if (val) { $ta.val(val).trigger('input'); }
});
</script>

View File

@@ -298,6 +298,18 @@
{/if}
<ul id="header_employee_box">
{if isset($debug_mode) && $debug_mode == true}
<li class="hidden-sm hidden-xs">
<a href="{$link->getAdminLink('AdminPerformance')|escape:'html':'UTF-8'}" data-html="true"
class="toolbar_btn label-tooltip" data-toggle="tooltip" data-placement="bottom"
title="<p class='text-left text-nowrap'><strong>{l s='Your site is in debug mode.'}</strong></p>
<p class='text-left'>{l s='All PHP errors and messages are displayed. Disable debug mode from Performance tab.'}</p>">
<i class="icon-bug"></i>
<span>{l s='Debug mode'}</span>
</a>
</li>
{/if}
{if isset($upgrade_info->update_available) && $upgrade_info->update_available > 0}
<li class="hidden-md hidden-sm hidden-xs"><a href="{$upgrade_info->upgrade_url}">{l s='QloApps Update Availabe:'} {$upgrade_info->latest_availabe}</a></li>
{/if}

View File

@@ -123,7 +123,7 @@
function startTree(idElem) {
if (typeof $.fn.tree === 'undefined') {
setTimeout(startTree, 100);
setTimeout(function() { startTree(idElem); }, 100);
return;
}

View File

@@ -0,0 +1,280 @@
{*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a newer
* versions in the future. If you wish to customize this module for your needs
* please refer to https://store.webkul.com/customisation-guidelines for more information.
*
* @author Webkul IN
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*}
{if $languages}
<div class="form-group seo-preview-group">
<div class="col-lg-1"></div>
<label class="control-label col-lg-2 seo-label">
{if !isset($show_label_tooltip) || $show_label_tooltip}
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Preview how this page may appear in search results.'}">
{l s='SEO Preview'}
</span>
{else}
{l s='SEO Preview'}
{if isset($show_flag) && $show_flag && count($languages) > 1}
<img class="all_lang_icon" data-lang-id="{$currentLang.id_lang}" src="{$ps_img_dir}{$currentLang.id_lang}.jpg">
{/if}
{/if}
</label>
<div class="col-lg-8">
{foreach from=$languages item=language}
{assign var=id_lang value=$language.id_lang}
<div class="panel seo-preview-panel lang-{$id_lang} translatable-field lang-{$id_lang} wk_text_field_all wk_text_field_{$id_lang}"
data-lang-id="{$id_lang}" {if isset($currentLang) && $currentLang.id_lang != $id_lang}style="display:none;"
{/if}>
{assign var=seoPreviewTitleDefault value=''}
{assign var=seoPreviewDescriptionDefault value=''}
{if isset($inputs.name[$id_lang]) && $inputs.name[$id_lang]|trim}
{assign var=seoPreviewTitleDefault value=$inputs.name[$id_lang]}
{elseif isset($product) && isset($product->name[$id_lang]) && $product->name[$id_lang]|trim}
{assign var=seoPreviewTitleDefault value=$product->name[$id_lang]}
{elseif isset($inputs.link_rewrite[$id_lang]) && $inputs.link_rewrite[$id_lang]|trim}
{assign var=seoPreviewTitleDefault value=$inputs.link_rewrite[$id_lang]}
{/if}
{if isset($inputs.description_short[$id_lang]) && $inputs.description_short[$id_lang]|trim}
{assign var=seoPreviewDescriptionDefault value=$inputs.description_short[$id_lang]|strip_tags}
{elseif isset($product) && isset($product->description_short[$id_lang]) && $product->description_short[$id_lang]|trim}
{assign var=seoPreviewDescriptionDefault value=$product->description_short[$id_lang]|strip_tags}
{/if}
<span id="seo-preview-title-default_{$id_lang}"
class="seo-preview-default">{$seoPreviewTitleDefault|escape:'html':'UTF-8'}</span>
<span id="seo-preview-description-default_{$id_lang}"
class="seo-preview-default">{$seoPreviewDescriptionDefault|escape:'html':'UTF-8'}</span>
<div class="seo-preview-url">
{if isset($preview_link[$id_lang])}
{assign var=rewriteActive value=(is_array($preview_link[$id_lang]) && isset($preview_link[$id_lang][1]))}
<a id="seo-preview-url-link_{$id_lang}" class="seo-preview-url-text seo-preview-url-link"
data-has-rewrite="{if $rewriteActive}1{else}0{/if}"
{if $rewriteActive}
href="{$preview_link[$id_lang][0]|escape:'html':'UTF-8'}{$inputs.link_rewrite[$id_lang]|default:''|escape:'html':'UTF-8'}{$preview_link[$id_lang][1]|escape:'html':'UTF-8'}"
{elseif is_array($preview_link[$id_lang])}
href="{$preview_link[$id_lang][0]|escape:'html':'UTF-8'}"
{else}
href="{$preview_link[$id_lang]|escape:'html':'UTF-8'}{$inputs.link_rewrite[$id_lang]|default:''|escape:'html':'UTF-8'}"
{/if} target="_blank" rel="noopener" title="{l s='Open preview link'}">
{else}
<div class="seo-preview-url-text">
{/if}
{strip}
{if isset($preview_link[$id_lang]) && $rewriteActive}
<span class="preview-base" style="display:none">{$preview_link[$id_lang][0]|escape:'html':'UTF-8'}</span>
<span id="friendly-url_{$id_lang}" style="display:none">{$inputs.link_rewrite[$id_lang]|default:''|escape:'html':'UTF-8'}</span>
<span class="preview-extension" style="display:none">{$preview_link[$id_lang][1]|escape:'html':'UTF-8'}</span>
{elseif isset($preview_link[$id_lang]) && is_array($preview_link[$id_lang])}
<span class="preview-base" style="display:none">{$preview_link[$id_lang][0]|escape:'html':'UTF-8'}</span>
{elseif isset($preview_link[$id_lang])}
<span class="preview-base" style="display:none">{$preview_link[$id_lang]|escape:'html':'UTF-8'}</span>
<span id="friendly-url_{$id_lang}" style="display:none">{$inputs.link_rewrite[$id_lang]|default:''|escape:'html':'UTF-8'}</span>
{/if}
{if isset($preview_link[$id_lang])}<span class="seo-url-breadcrumb"></span>{/if}
{/strip}
{if isset($preview_link[$id_lang])}
</a>
{else}
</div>
{/if}
<span class="seo-preview-more" aria-hidden="true">⋮</span>
</div>
{if isset($inputs.meta_title[$id_lang])}
<div id="meta-title_{$id_lang}" class="seo-meta-title primary">
{assign var=seoPreviewTitle value=$inputs.meta_title[$id_lang]|default:''}
{if $seoPreviewTitle|trim}
{$seoPreviewTitle|escape:'html':'UTF-8'}
{else}
{$seoPreviewTitleDefault|escape:'html':'UTF-8'}
{/if}
</div>
{/if}
{if isset($inputs.meta_description[$id_lang])}
<div id="meta-description_{$id_lang}" class="seo-meta-description">
{assign var=seoPreviewDescription value=$inputs.meta_description[$id_lang]|default:''}
{if $seoPreviewDescription|trim}
{$seoPreviewDescription|escape:'html':'UTF-8'}
{else}
{$seoPreviewDescriptionDefault|escape:'html':'UTF-8'}
{/if}
</div>
{/if}
</div>
{/foreach}
<div class="help-block seo-preview-note">
{l s='Leaving Meta title or Meta description blank will use the default values in the preview (Name and Short Description).'}
</div>
</div>
</div>
{addJsDef languages=$languages}
<script>
$(document).ready(function() {
if (typeof languages === 'undefined' || !languages || typeof languages.forEach !== 'function') {
return;
}
languages.forEach(function(language) {
var idLang = language.id_lang;
$('#meta_title_' + idLang + ', #meta_description_' + idLang + ', #link_rewrite_' + idLang)
.on('keyup', function() {
updateSeoPreview(idLang);
});
$('#name_' + idLang + ', #description_short_' + idLang + ', #short_description_' + idLang)
.on('keyup change', function() {
updateSeoPreview(idLang);
});
updateSeoPreview(idLang);
});
});
function stripTags(text) {
return $('<div/>').html(text || '').text();
}
function updateSeoPreviewDefaults(idLang) {
var titleDefaultEl = $('#seo-preview-title-default_' + idLang);
var descriptionDefaultEl = $('#seo-preview-description-default_' + idLang);
var nameValue = ($('#name_' + idLang).val() || '').trim();
if (nameValue.length) {
titleDefaultEl.text(nameValue);
}
var descriptionValue = '';
var descriptionShortField = $('#description_short_' + idLang);
if (descriptionShortField.length) {
descriptionValue = descriptionShortField.val() || '';
} else {
var hotelShortDescriptionField = $('#short_description_' + idLang);
if (hotelShortDescriptionField.length) {
descriptionValue = hotelShortDescriptionField.val() || '';
}
}
descriptionValue = stripTags(descriptionValue).trim();
if (descriptionValue.length) {
descriptionDefaultEl.text(descriptionValue);
}
}
function truncatePreview(text, limit) {
return text.length > limit ? text.substring(0, limit) + '...' : text;
}
function updateSeoPreview(idLang) {
var title = $('#meta_title_' + idLang).val();
var description = $('#meta_description_' + idLang).val();
var link = $('#link_rewrite_' + idLang).val();
updateSeoPreviewDefaults(idLang);
if (title !== undefined) {
var titlePreview = $('#meta-title_' + idLang);
var defaultTitle = $('#seo-preview-title-default_' + idLang).text() || '';
var valueTitle = (title || '').trim();
titlePreview.text(truncatePreview(valueTitle.length ? valueTitle : defaultTitle, 70));
}
if (description !== undefined) {
var descriptionPreview = $('#meta-description_' + idLang);
var defaultDescription = $('#seo-preview-description-default_' + idLang).text() || '';
var valueDescription = (description || '').trim();
descriptionPreview.text(truncatePreview(valueDescription.length ? valueDescription : defaultDescription, 160));
}
if (link !== undefined) {
$('#friendly-url_' + idLang).text(link.trim());
}
updateSeoPreviewLink(idLang);
}
function formatUrlBreadcrumb(url) {
var withoutQuery = url.split('?')[0].split('#')[0].replace(/\/$/, '');
var match = withoutQuery.match(/^(https?:\/\/[^\/]+)(\/.*)?$/);
if (!match) return url;
var parts = [match[1]];
if (match[2]) {
var segments = match[2].replace(/^\//, '').split('/').filter(function(s) { return s.length > 0; });
parts = parts.concat(segments);
}
return parts.join(' › ');
}
function updateSeoPreviewLink(idLang) {
var urlLink = $('#seo-preview-url-link_' + idLang);
if (!urlLink.length) {
return;
}
var container = $('.wk_text_field_' + idLang);
var href;
if (urlLink.data('has-rewrite')) {
var base = container.find('.preview-base').text() || '';
var slug = container.find('#friendly-url_' + idLang).text() || '';
var ext = container.find('.preview-extension').text() || '';
href = (base + slug + ext).trim();
} else {
href = (urlLink.attr('href') || '').trim();
}
if (href.length) {
urlLink.attr('href', href);
urlLink.find('.seo-url-breadcrumb').text(formatUrlBreadcrumb(href));
}
}
</script>
{/if}
<style>
.seo-preview-more {
font-size: 16px;
}
.seo-meta-title {
color: #1a0dab;
font-size: 18px;
font-weight: normal;
word-wrap: break-word;
overflow-wrap: break-word;
word-break: break-word;
}
.seo-meta-description {
font-size: 14px;
word-wrap: break-word;
overflow-wrap: break-word;
word-break: break-word;
}
.seo-preview-url-link {
color: inherit !important;
text-decoration: none;
}
.seo-url-breadcrumb {
font-size: 12px;
color: #4d5156;
word-break: break-all;
}
.seo-preview-default {
display: none;
}
.panel.seo-preview-panel {
margin-bottom: 0 !important;
}
</style>