diff --git a/server/documents/modules/popup.html.eco b/server/documents/modules/popup.html.eco index dd3f1fb98..c54fc2b69 100755 --- a/server/documents/modules/popup.html.eco +++ b/server/documents/modules/popup.html.eco @@ -44,7 +44,7 @@ themes : ['Default']

An element can specify popup content with a title

- +
@@ -58,7 +58,7 @@ themes : ['Default']
My Neighbor Totoro
- Two sisters move to the country with their father in order to be closer to their hospitalized mother, and discover the surrounding trees are inhabited by Totoros, magical spirits of the forest. When the youngest runs away from home, the older sister seeks help from the spirits to find her. + Two sisters move to the country with their father in order to be closer to their hospitalized mother, and discover the surrounding trees are inhabited by Totoros, magical spirits of the forest.
@@ -76,7 +76,7 @@ themes : ['Default']

Pre-Existing

-

An element can display a pre-existing popup that is include after it

+

An element can display a popup that is already included in the page

@@ -84,6 +84,9 @@ themes : ['Default']
Watchmen
+
+ In a gritty and alternate 1985 the glory days of costumed vigilantes have been brought to a close by a government crackdown, but after one of the masked veterans is brutally murdered an investigation into the killer is initiated. +
diff --git a/server/documents/modules/rating.html.eco b/server/documents/modules/rating.html.eco index ac3e94572..e9256c0c1 100755 --- a/server/documents/modules/rating.html.eco +++ b/server/documents/modules/rating.html.eco @@ -33,23 +33,21 @@ themes : ['Default']

Rating

A basic rating

-
+

Star

A rating can use a set of star icons

-
- Rating -
-
+ Rating +

Heart

A rating can use a set of heart icons

-
+

Variations

@@ -77,21 +75,24 @@ themes : ['Default']

Setting existing values

-

Starting ratings can be set either using metadata values or the setting initialRating.

-
If a metadata rating is specified it will automatically override any initial rating. This way you can set a default value but also allow it to be overridden.
+

The starting rating can be set either using metadata value data-rating or the setting initialRating. +

The maximum rating can be be set using the metadata value data-max-rating or the settings maxRating, or you can just include the icon html yourself on initialization to avoid the overhead of the DOM template insertions.

+
If a metadata rating is specified it will automatically override the default value specified in javascript.
+
+ $('.toggle.example .rating') + .rating({ + initialRating: 2, + maxRating: 4 + }) + ; +
New York Dog Fair -
- - - - - -
+
A fun day at the fair
@@ -101,13 +102,7 @@ themes : ['Default']
Dog Appreciation Day -
- - - - - -
+
I'd like to tell your dog he's great
diff --git a/server/files/javascript/semantic.js b/server/files/javascript/semantic.js index ae170ec14..0f58afab5 100755 --- a/server/files/javascript/semantic.js +++ b/server/files/javascript/semantic.js @@ -559,7 +559,7 @@ semantic.ready = function() { }) .find('.button') .popup({ - position : 'top center', + position : 'top right', variation : 'inverted' }) ; diff --git a/src/definitions/modules/popup.js b/src/definitions/modules/popup.js index a9bfeb94a..4258aaa58 100755 --- a/src/definitions/modules/popup.js +++ b/src/definitions/modules/popup.js @@ -883,7 +883,6 @@ $.fn.popup.settings = { inline : false, preserve : true, hoverable : false, - includeMargin : false, duration : 200, easing : 'easeOutQuint', diff --git a/src/definitions/modules/rating.js b/src/definitions/modules/rating.js index af6d1c097..7e8c156c5 100755 --- a/src/definitions/modules/rating.js +++ b/src/definitions/modules/rating.js @@ -101,9 +101,12 @@ $.fn.rating = function(parameters) { setup: { layout: function() { + var + maxRating = $module.data(metadata.maxRating) || settings.maxRating + ; module.debug('Generating icon html dynamically'); $module - .html($.fn.rating.settings.templates.icon(settings.maxRating)) + .html($.fn.rating.settings.templates.icon(maxRating)) ; module.refresh(); } @@ -414,7 +417,8 @@ $.fn.rating.settings = { metadata: { - rating: 'rating' + rating : 'rating', + maxRating : 'maxRating' }, className : { diff --git a/src/themes/packages/default/modules/popup.variables b/src/themes/packages/default/modules/popup.variables old mode 100644 new mode 100755 index b660612f7..2c07d68ad --- a/src/themes/packages/default/modules/popup.variables +++ b/src/themes/packages/default/modules/popup.variables @@ -10,12 +10,13 @@ @background: @white; @maxWidth: 250px; -@border: 1px solid rgba(0, 0, 0, 0.1); +@borderColor: #CCCCCC; +@borderWidth: 1px; @boxShadow: 0px 1px 2px rgba(0, 0, 0, 0.1); @color: @textColor; -@verticalPadding: 0.8em; -@horizontalPadding: 1.2em; +@verticalPadding: 0.75em; +@horizontalPadding: 1.25em; @fontWeight: normal; @fontStyle: normal; @borderRadius: 0.2em; @@ -38,18 +39,21 @@ @headerDistance: 0.5em; @headerLineHeight: 1.2; +/* Content Border */ +@border: @borderWidth solid @borderColor; + /* Arrow */ @arrowBackground: @white; @arrowZIndex: 2; -@arrowOffset: -(@arrowSize / 2); +@arrowJitter: 0.05em; +@arrowOffset: -(@arrowSize / 2) + @arrowJitter; -@arrowShadowColor: rgba(0, 0, 0, 0.2); -@arrowStroke: 1px; +@arrowStroke: darken(@borderColor, 10); -@arrowBoxShadow: 1px 1px @arrowStroke @arrowShadowColor; -@leftArrowBoxShadow: 1px -1px @arrowStroke @arrowShadowColor; -@rightArrowBoxShadow: -1px 1px @arrowStroke @arrowShadowColor; -@bottomArrowBoxShadow: -1px -1px @arrowStroke @arrowShadowColor; +@arrowBoxShadow: @arrowStroke @arrowStroke 0px 0px @borderColor; +@leftArrowBoxShadow: @arrowStroke -@arrowStroke 0px 0px @borderColor; +@rightArrowBoxShadow: -@arrowStroke @arrowStroke 0px 0px @borderColor; +@bottomArrowBoxShadow: -@arrowStroke -@arrowStroke 0px 0px @borderColor; /*------------------- Coupling