just for rename
This commit is contained in:
app/views
admin
app
blog
errors
file
home
find_password.htmlfind_password2.htmlfind_password2_timeout.htmlfooter.htmlheader.htmlheader_box.htmlindex.htmlindex_en.htmlindex_zh.htmllogin.htmlmodal.htmlregister.html
html2Image
note
notebook
oauth
share
user
71
app/views/share/note_notebook_share_user_infos.html
Normal file
71
app/views/share/note_notebook_share_user_infos.html
Normal file
@ -0,0 +1,71 @@
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="modalTitle">{{msg . "share"}} <b>{{.title}}</b></h4>
|
||||
</div>
|
||||
{{$noteOrNotebookId := .noteOrNotebookId}}
|
||||
|
||||
<div class="modal-body">
|
||||
<button class="btn btn-default" id="addShareNotebookBtn">{{msg . "addShare"}}</button>
|
||||
<div id="shareMsg" class="alert alert-danger" style="display: none; margin: 5px 0 0 0;"></div>
|
||||
<table class="table table-hover" id="shareNotebookTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{msg . "friendEmail"}}</th>
|
||||
<th>{{msg . "permission"}}</th>
|
||||
<th width="150px">{{msg . "delete"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="tr1">
|
||||
<td>#</td>
|
||||
<td>
|
||||
<input id="friendsEmail" type="text" class="form-control" placeholder="{{msg . "friendEmail"}}">
|
||||
</td>
|
||||
<td>
|
||||
<label for="readPerm1"><input type="radio" name="perm1" checked="checked" value="0" id="readPerm1"> {{msg . "readOnly"}}</label>
|
||||
<label for="writePerm1"><input type="radio" name="perm1" value="1" id="writePerm1"> {{msg . "writable"}}</label>
|
||||
</td>
|
||||
<td>
|
||||
<button class="btn btn-success" onclick="addShareNoteOrNotebook(1)">{{msg . "share"}}</button>
|
||||
<button class="btn btn-warning" onclick="deleteShareNoteOrNotebook(1)">{{msg . "delete"}}</button>
|
||||
</td>
|
||||
</tr>
|
||||
{{range $i, $v := .noteOrNotebookShareUserInfos}}
|
||||
{{$toUserId := $v.ToUserId.Hex}}
|
||||
<tr>
|
||||
<td>{{add $i}}</td>
|
||||
<td>{{$v.Email}}</td>
|
||||
<td>
|
||||
{{if eq $v.Perm 0}}
|
||||
<a href="#" noteOrNotebookId="{{$noteOrNotebookId}}" perm="{{$v.Perm}}" toUserId="{{$toUserId}}" title="点击改变权限" class="btn btn-default change-perm">{{msg . "readOnly"}}</a>
|
||||
{{else}}
|
||||
<a href="#" noteOrNotebookId="{{$noteOrNotebookId}}" perm="{{$v.Perm}}" toUserId="{{$toUserId}}" title="点击改变权限" class="btn btn-default change-perm">{{msg . "writable"}}</a>
|
||||
{{end}}
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" noteOrNotebookId="{{$noteOrNotebookId}}" toUserId="{{$toUserId}}" class="btn btn-warning delete-share">{{msg . "delete"}}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{msg . "close"}}</button>
|
||||
</div>
|
||||
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
<script>
|
||||
Share.dialogIsNote = {{.isNote}};
|
||||
Share.dialogNoteOrNotebookId = '{{.noteOrNotebookId}}';
|
||||
$(function() {
|
||||
setTimeout(function() {
|
||||
$("#tr1 #friendsEmail").focus();
|
||||
}, 500);
|
||||
});
|
||||
</script>
|
84
app/views/share/note_share_user_infos.html
Normal file
84
app/views/share/note_share_user_infos.html
Normal file
@ -0,0 +1,84 @@
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="modalTitle">{{.note.Title}} 的分享状态</h4>
|
||||
</div>
|
||||
{{$noteId := .note.NoteId.Hex}}
|
||||
|
||||
<div class="modal-body">
|
||||
{{if .noteShareUserInfos }}
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Email</th>
|
||||
<th>权限</th>
|
||||
<th>删除分享</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range $i, $v := .noteShareUserInfos}}
|
||||
{{$toUserId := $v.ToUserId.Hex}}
|
||||
<tr>
|
||||
<td>{{add $i}}</td>
|
||||
<td>{{$v.Email}}</td>
|
||||
<td>
|
||||
{{if eq $v.Perm 0}}
|
||||
<a href="#" noteId="{{$noteId}}" perm="{{$v.Perm}}" toUserId="{{$toUserId}}" title="点击改变权限" class="btn btn-default change-perm">只读</a>
|
||||
{{else}}
|
||||
<a href="#" noteId="{{$noteId}}" perm="{{$v.Perm}}" toUserId="{{$toUserId}}" title="点击改变权限" class="btn btn-default change-perm">可编辑</a>
|
||||
{{end}}
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" noteId="{{$noteId}}" toUserId="{{$toUserId}}" class="btn btn-warning delete-share">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{else}}
|
||||
无分享信息
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
<script>
|
||||
$(function() {
|
||||
$(".change-perm").click(function() {
|
||||
var self = this;
|
||||
var perm = $(this).attr("perm");
|
||||
var noteId = $(this).attr("noteId");
|
||||
var toUserId = $(this).attr("toUserId");
|
||||
var toHtml = "可编辑";
|
||||
var toPerm = "1";
|
||||
if(perm == "1") {
|
||||
toHtml = "只读";
|
||||
toPerm = "0";
|
||||
}
|
||||
ajaxGet("/share/UpdateShareNotePerm", {noteId: noteId, perm: toPerm, toUserId: toUserId}, function(ret) {
|
||||
if(ret) {
|
||||
$(self).html(toHtml);
|
||||
$(self).attr("perm", toPerm);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(".delete-share").click(function() {
|
||||
var self = this;
|
||||
var noteId = $(this).attr("noteId");
|
||||
var toUserId = $(this).attr("toUserId");
|
||||
ajaxGet("/share/DeleteShareNote", {noteId: noteId, toUserId: toUserId}, function(ret) {
|
||||
if(ret) {
|
||||
$(self).parent().parent().remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
Reference in New Issue
Block a user