Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2013-04-23 10:38:50 +0400
committermattab <matthieu.aubry@gmail.com>2013-04-23 10:38:50 +0400
commitb5067e0f1c106f6d6cae2415eaf67052c96d5ace (patch)
tree98adad291268411f3630b13ec414a2b1bdf5379b /plugins
parent7933de115b3fc7e5dc9bc58b7e979cdefb89d16d (diff)
Refs #2135
Reverting some reformat code that went wrong (as Jquery 1.9 expects HTML strings to start with < rather than a space followed by <
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Dashboard/templates/dashboard.js2
-rw-r--r--plugins/SegmentEditor/templates/selector.tpl95
2 files changed, 44 insertions, 53 deletions
diff --git a/plugins/Dashboard/templates/dashboard.js b/plugins/Dashboard/templates/dashboard.js
index 82469d9c91..c1c6996f93 100644
--- a/plugins/Dashboard/templates/dashboard.js
+++ b/plugins/Dashboard/templates/dashboard.js
@@ -13,7 +13,7 @@ function initDashboard(dashboardId, dashboardLayout) {
var leftMargin = $('#periodString')[0].offsetWidth;
var segmentSelector = $('.segmentationContainer:visible');
- if (segmentSelector.length) {
+ if(segmentSelector.length) {
segmentSelector = $($('.segmentationContainer:visible')[0]);
leftMargin = segmentSelector.position().left + segmentSelector.outerWidth();
}
diff --git a/plugins/SegmentEditor/templates/selector.tpl b/plugins/SegmentEditor/templates/selector.tpl
index 1163cb839a..2fb81cde55 100644
--- a/plugins/SegmentEditor/templates/selector.tpl
+++ b/plugins/SegmentEditor/templates/selector.tpl
@@ -12,29 +12,24 @@
<a class="add_new_segment">Add new segment</a>
</div>
- <div class="initial-state-rows">
- <div class="segment-add-row initial">
- <div>
- <span>+ Drag &amp; Drop condition</span>
- </div>
- </div>
- <div class="segment-and">AND</div>
- <div class="segment-add-row initial">
- <div>
- <span>+ Drag &amp; Drop condition</span>
- </div>
- </div>
+ <div class="initial-state-rows">{* no space here important for jquery *}<div class="segment-add-row initial"><div>
+ <span>+ Drag &amp; Drop condition</span>
+ </div></div>
+ <div class="segment-and">AND</div>
+ <div class="segment-add-row initial"><div>
+ <span>+ Drag &amp; Drop condition</span>
+ </div></div>
</div>
<div class="segment-row-inputs">
<div class="segment-input metricListBlock">
<select title="Choose a segment" class="metricList">
{foreach from=$segmentsByCategory key=category item=segmentsInCategory}
- <optgroup label="{$category}">
- {foreach from=$segmentsInCategory item=segmentInCategory}
- <option data-type="{$segmentInCategory.type}" value="{$segmentInCategory.segment}">{$segmentInCategory.name}</option>
- {/foreach}
- </optgroup>
+ <optgroup label="{$category}">
+ {foreach from=$segmentsInCategory item=segmentInCategory}
+ <option data-type="{$segmentInCategory.type}" value="{$segmentInCategory.segment}">{$segmentInCategory.name}</option>
+ {/foreach}
+ </optgroup>
{/foreach}
</select>
</div>
@@ -62,59 +57,55 @@
</div>
</div>
<div class="segment-or">OR</div>
- <div class="segment-add-or">
- <div>
+ <div class="segment-add-or"><div>
<a href="#"> + Add <span>OR</span> condition </a>
</div>
</div>
<div class="segment-and">AND</div>
- <div class="segment-add-row">
- <div>
+ <div class="segment-add-row"><div>
<a href="#">+ Add <span>AND</span> condition </a>
</div>
</div>
<div style="position: absolute; z-index:999; width:1040px;" class="segment-element">
<div class="segment-nav">
<h4 class="visits"><span id="available_segments"><strong>
- <select id="available_segments_select"></select>
- </strong></span></h4>
-
+ <select id="available_segments_select"></select>
+ </strong></span></h4>
<div class="scrollable">
- <ul>
- {foreach from=$segmentsByCategory key=category item=segmentsInCategory}
- <li data="visit"><a class="metric_category" href="#">{$category}</a>
- <ul style="display:none">
- {foreach from=$segmentsInCategory item=segmentInCategory}
- <li data-metric="{$segmentInCategory.segment}"><a class="ddmetric" href="#">{$segmentInCategory.name}</a></li>
- {/foreach}
- </ul>
- </li>
- {/foreach}
- </ul>
+ <ul>
+ {foreach from=$segmentsByCategory key=category item=segmentsInCategory}
+ <li data="visit"><a class="metric_category" href="#">{$category}</a>
+ <ul style="display:none">
+ {foreach from=$segmentsInCategory item=segmentInCategory}
+ <li data-metric="{$segmentInCategory.segment}"><a class="ddmetric" href="#">{$segmentInCategory.name}</a></li>
+ {/foreach}
+ </ul>
+ </li>
+ {/foreach}
+ </ul>
</div>
<div class="custom_select_search">
<a href="#"></a>
- <input type="text" aria-haspopup="true" aria-autocomplete="list" role="textbox" autocomplete="off" class="inp ui-autocomplete-input"
- id="segmentSearch" value="Search" length="15">
+ <input type="text" aria-haspopup="true" aria-autocomplete="list" role="textbox" autocomplete="off" class="inp ui-autocomplete-input" id="segmentSearch" value="Search" length="15">
</div>
</div>
<div class="segment-content">
{if $isSuperUser}
- <div class="segment-top">
- This segment is visible to: <span id="enabledAllUsers"><strong>
- <select id="enabledAllUsers_select">
- <option selected="" value="0">me</option>
- <option value="1">All users</option>
- </select>
- </strong></span>
+ <div class="segment-top">
+ This segment is visible to: <span id="enabledAllUsers"><strong>
+ <select id="enabledAllUsers_select">
+ <option selected="" value="0">me</option>
+ <option value="1">All users</option>
+ </select>
+ </strong></span>
- and displayed for <span id="visible_to_website"><strong>
- <select id="visible_to_website_select">
- <option selected="" value="{$idSite}">this website only</option>
- <option value="0">all websites</option>
- </select>
- </strong></span>
- </div>
+ and displayed for <span id="visible_to_website"><strong>
+ <select id="visible_to_website_select">
+ <option selected="" value="{$idSite}">this website only</option>
+ <option value="0">all websites</option>
+ </select>
+ </strong></span>
+ </div>
{/if}
<h3>Name: <span>New segment</span> <a class="editSegmentName" href="#">edit</a></h3>
</div>
@@ -137,5 +128,5 @@
</div>
<script type="text/javascript">
- var availableSegments = {$savedSegmentsJson};
+var availableSegments = {$savedSegmentsJson};
</script>