[SSE mobile] refactoring

This commit is contained in:
Maxim Kadushkin 2016-12-14 15:38:50 +03:00
parent dd8845ea12
commit dc152bda46
3 changed files with 3 additions and 85 deletions

View file

@ -1,70 +0,0 @@
<!-- Root view -->
<div id="addimage-root-view">
<div class="list-block">
<ul>
<li>
<a id="add-image-file" class="item-link no-indicator">
<div class="item-content">
<div class="item-media">
<i class="icon icon-search"></i>
</div>
<div class="item-inner">
<div class="item-title">Picture from Library</div>
</div>
</div>
</a>
</li>
<li>
<a id="add-image-url" class="item-link">
<div class="item-content">
<div class="item-media">
<i class="icon icon-link"></i>
</div>
<div class="item-inner">
<div class="item-title">Picture from URL</div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
<!-- Url view -->
<div id="addimage-url-view">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span>Back</span><% } %></a></div>
<div class="center sliding">Link Settings</div>
</div>
</div>
<div class="page" id="addimage-url">
<div class="page-content">
<div class="content-block-title">Address</div>
<div class="list-block">
<ul>
<li>
<div id="addimage-link-url" class="item-content">
<div class="item-inner">
<div class="item-input">
<input type="url" placeholder="Image URL">
</div>
</div>
</div>
</li>
</ul>
</div>
<div class="list-block disabled" id="addimage-insert">
<% if (android) { %>
<a href="#" class="button button-fill button-raised" style="margin: 20px 16px;">Insert Image</a>
<% } else { %>
<ul>
<li>
<a href="#" class="list-button item-link">Insert Image</a>
</li>
</ul>
<% } %>
</div>
</div>
</div>
</div>

View file

@ -1,12 +0,0 @@
<!-- Root view -->
<div id="add-table-root">
<div class="page-content dataview table-styles">
<ul class="row">
<% _.each(styles, function(style) { %>
<li data-type="<%= style.templateId %>">
<img src="<%= style.imageUrl %>">
</li>
<% }); %>
</ul>
</div>
</div>

View file

@ -117,7 +117,7 @@ define([
$('#addimage-url').single('click', this.showImageFromUrl.bind(this)); $('#addimage-url').single('click', this.showImageFromUrl.bind(this));
$('#addimage-file').single('click', function () { $('#addimage-file').single('click', function () {
this.fireEvent('insert:image',[{islocal:true}]); this.fireEvent('image:insert',[{islocal:true}]);
}.bind(this)); }.bind(this));
}, },
@ -140,7 +140,7 @@ define([
display = $('#add-link-display input').val(), display = $('#add-link-display input').val(),
tip = $('#add-link-tip input').val(); tip = $('#add-link-tip input').val();
this.fireEvent('insert:link', [{url:url, text:display, tooltip:tip}]); this.fireEvent('link:insert', [{url:url, text:display, tooltip:tip}]);
}, },
showImageFromUrl: function () { showImageFromUrl: function () {
@ -151,7 +151,7 @@ define([
$('#addimage-insert a').single('click', _.buffered(function () { $('#addimage-insert a').single('click', _.buffered(function () {
var value = ($input.val()).replace(/ /g, ''); var value = ($input.val()).replace(/ /g, '');
me.fireEvent('insert:image', [{islocal:false, url:value}]); me.fireEvent('image:insert', [{islocal:false, url:value}]);
}, 100, me)); }, 100, me));
var $btnInsert = $('#addimage-insert'); var $btnInsert = $('#addimage-insert');