1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-17 07:41:26 +00:00

[icons] modification

This commit is contained in:
llj
2016-04-12 15:53:51 +08:00
parent 3f23a1685e
commit d4f5bc4817
11 changed files with 32 additions and 10 deletions

View File

@@ -125,6 +125,8 @@ $(function() {
} }
}); });
} }
return false;
}); });
$('#my-info').click(function() { $('#my-info').click(function() {

View File

@@ -25,7 +25,7 @@
<td> <td>
<div class="share-permission"> <div class="share-permission">
<span class="share-permission-cur-value">{{ repo.share_permission }}</span> <span class="share-permission-cur-value">{{ repo.share_permission }}</span>
<span title="{% trans "Edit"%}" class="share-permission-edit-icon sf2-icon-edit op-icon vh"></span> <a href="#" title="{% trans "Edit"%}" class="share-permission-edit-icon sf2-icon-edit op-icon vh"></a>
</div> </div>
<select name="permission" class="share-permission-select hide"> <select name="permission" class="share-permission-select hide">
<option value="{{ repo.props.permission }}" selected="selected">{{ repo.share_permission }}</option> <option value="{{ repo.props.permission }}" selected="selected">{{ repo.share_permission }}</option>
@@ -66,6 +66,8 @@ addFormPost($('.unshare'));
$('.share-permission-edit-icon').click(function() { $('.share-permission-edit-icon').click(function() {
$(this).parent().addClass('hide'); $(this).parent().addClass('hide');
$(this).parent().next().removeClass('hide'); // show 'share-permission-select' $(this).parent().next().removeClass('hide'); // show 'share-permission-select'
return false;
}); });
$('.share-permission-select').change(function() { $('.share-permission-select').change(function() {
var select = $(this), var select = $(this),

View File

@@ -29,7 +29,7 @@
<td> <td>
<div class="share-permission"> <div class="share-permission">
<span class="share-permission-cur-value">{{ repo.share_permission }}</span> <span class="share-permission-cur-value">{{ repo.share_permission }}</span>
<span title="{% trans "Edit"%}" class="share-permission-edit-icon sf2-icon-edit op-icon vh"></span> <a href="#" title="{% trans "Edit"%}" class="share-permission-edit-icon sf2-icon-edit op-icon vh"></a>
</div> </div>
<select name="permission" class="share-permission-select hide"> <select name="permission" class="share-permission-select hide">
<option value="{{ repo.props.permission }}" selected="selected">{{ repo.share_permission }}</option> <option value="{{ repo.props.permission }}" selected="selected">{{ repo.share_permission }}</option>
@@ -72,6 +72,8 @@ $('.share-permission-edit-icon').click(function() {
perm_select = cur_perm.next(); perm_select = cur_perm.next();
cur_perm.addClass('hide'); cur_perm.addClass('hide');
perm_select.removeClass('hide'); // show 'share-permission-select' perm_select.removeClass('hide'); // show 'share-permission-select'
return false;
}); });
$('.share-permission-select').change(function() { $('.share-permission-select').change(function() {
var select = $(this), var select = $(this),

View File

@@ -59,7 +59,7 @@
<ul class="hide" id="notice-list" data-url="{% url 'set_notice_seen_by_id' %}"></ul> <ul class="hide" id="notice-list" data-url="{% url 'set_notice_seen_by_id' %}"></ul>
<p class="alc"><a href="{% url 'user_notification_list' %}" class="all">{% trans "See All Notifications" %}</a></p> <p class="alc"><a href="{% url 'user_notification_list' %}" class="all">{% trans "See All Notifications" %}</a></p>
</div> </div>
<span class="close sf2-icon-x1 op-icon" data-url="{% url 'set_notices_seen' %}" title="{% trans "Close" %}"></span> <a href="#" class="close sf2-icon-x1 op-icon" data-url="{% url 'set_notices_seen' %}" title="{% trans "Close" %}"></a>
</div> </div>
</div> </div>

View File

@@ -70,7 +70,7 @@
<ul class="hide" id="notice-list"></ul> <ul class="hide" id="notice-list"></ul>
<p class="alc"><a href="{% url 'user_notification_list' %}" class="all">{% trans "See All Notifications" %}</a></p> <p class="alc"><a href="{% url 'user_notification_list' %}" class="all">{% trans "See All Notifications" %}</a></p>
</div> </div>
<span class="close sf2-icon-x1 op-icon" title="{% trans "Close" %}"></span> <a href="#" class="close sf2-icon-x1 op-icon" title="{% trans "Close" %}"></a>
</div> </div>
</div> </div>

View File

@@ -739,7 +739,7 @@
{% trans "Read-Only" %} {% trans "Read-Only" %}
<% } %> <% } %>
</span> </span>
<span title="{% trans "Edit" %}" class="perm-edit-icon sf2-icon-edit op-icon vh"></span> <a href="#" title="{% trans "Edit" %}" class="perm-edit-icon sf2-icon-edit op-icon vh"></a>
</div> </div>
<select class="perm-toggle-select hide w100"> <select class="perm-toggle-select hide w100">
<% if (perm == 'rw') { %> <% if (perm == 'rw') { %>
@@ -752,7 +752,7 @@
</select> </select>
</td> </td>
<td> <td>
<span class="sf2-icon-delete delete-icon op-icon vh" title="{% trans "Delete" %}"></span> <a href="#" class="sf2-icon-delete delete-icon op-icon vh" title="{% trans "Delete" %}"></a>
</td> </td>
</script> </script>
<script type="text/template" id="folder-perm-popup-tmpl"> <script type="text/template" id="folder-perm-popup-tmpl">
@@ -1206,7 +1206,7 @@
<td><%= formattedSize %></td> <td><%= formattedSize %></td>
<td><%= view_count %></td> <td><%= view_count %></td>
<td> <td>
<span class="sf2-icon-delete op-icon vh rm-link" title="{% trans "Remove"%}"></span> <a href="#" class="sf2-icon-delete op-icon vh rm-link" title="{% trans "Remove"%}"></a>
</td> </td>
</script> </script>
@@ -1336,14 +1336,14 @@
<td> <td>
<% if (permission == 'rw') { %> <% if (permission == 'rw') { %>
<span class="cur-perm">{% trans "Read-Write" %}</span> <span class="cur-perm">{% trans "Read-Write" %}</span>
<span title="{% trans "Edit" %}" class="edit-icon op-icon sf2-icon-edit vh"></span> <a href="#" title="{% trans "Edit" %}" class="edit-icon op-icon sf2-icon-edit vh"></a>
<select class="perm-toggle-select hide"> <select class="perm-toggle-select hide">
<option value="rw" selected="selected">{% trans "Read-Write" %}</option> <option value="rw" selected="selected">{% trans "Read-Write" %}</option>
<option value="r">{% trans "Read-Only"%}</option> <option value="r">{% trans "Read-Only"%}</option>
</select> </select>
<% } else { %> <% } else { %>
<span class="cur-perm">{% trans "Read-Only" %}</span> <span class="cur-perm">{% trans "Read-Only" %}</span>
<span title="{% trans "Edit" %}" class="edit-icon op-icon sf2-icon-edit vh"></span> <a href="#" title="{% trans "Edit" %}" class="edit-icon op-icon sf2-icon-edit vh"></a>
<select class="perm-toggle-select hide"> <select class="perm-toggle-select hide">
<option value="rw">{% trans "Read-Write" %}</option> <option value="rw">{% trans "Read-Write" %}</option>
<option value="r" selected="selected">{% trans "Read-Only"%}</option> <option value="r" selected="selected">{% trans "Read-Only"%}</option>
@@ -1351,7 +1351,7 @@
<% } %> <% } %>
</td> </td>
<td> <td>
<span class="rm op-icon sf2-icon-delete vh" title="{% trans "Delete" %}"></span> <a href="#" class="rm op-icon sf2-icon-delete vh" title="{% trans "Delete" %}"></a>
</td> </td>
</script> </script>

View File

@@ -44,6 +44,8 @@ define([
$(e.currentTarget).closest('td') $(e.currentTarget).closest('td')
.find('.perm').addClass('hide').end() .find('.perm').addClass('hide').end()
.find('.perm-toggle-select').removeClass('hide'); .find('.perm-toggle-select').removeClass('hide');
return false;
}, },
editPerm: function (e) { editPerm: function (e) {
@@ -130,6 +132,8 @@ define([
} }
} }
}); });
return false;
} }
}); });

View File

@@ -44,6 +44,8 @@ define([
$(e.currentTarget).closest('td') $(e.currentTarget).closest('td')
.find('.perm').addClass('hide').end() .find('.perm').addClass('hide').end()
.find('.perm-toggle-select').removeClass('hide'); .find('.perm-toggle-select').removeClass('hide');
return false;
}, },
editPerm: function (e) { editPerm: function (e) {
@@ -121,6 +123,8 @@ define([
} }
} }
}); });
return false;
} }
}); });

View File

@@ -51,6 +51,8 @@ define([
var $td = $(e.currentTarget).closest('td'); var $td = $(e.currentTarget).closest('td');
$('.cur-perm, .edit-icon', $td).hide(); $('.cur-perm, .edit-icon', $td).hide();
$('.perm-toggle-select', $td).show(); $('.perm-toggle-select', $td).show();
return false;
}, },
edit: function(e) { edit: function(e) {
@@ -134,6 +136,8 @@ define([
_this.data.$error.html(err_msg).show(); _this.data.$error.html(err_msg).show();
} }
}); });
return false;
} }
}); });

View File

@@ -86,6 +86,8 @@ define([
_this.data.$error.html(err_msg).show(); _this.data.$error.html(err_msg).show();
} }
}); });
return false;
} }
}); });

View File

@@ -648,6 +648,8 @@ define([
} }
}); });
} }
return false;
}); });
$(document).click(function(e) { $(document).click(function(e) {