Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
78 lines (69 sloc) 2.96 KB
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script>
<script src="https://cdn.rawgit.com/suyati/line-control/master/editor.js"></script>
<link rel="stylesheet" href="https://cdn.rawgit.com/suyati/line-control/master/editor.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" />
<script src="/_catalogs/masterpage/sp-tabbed-containers/sp-tabbed-containers.js"></script>
<link rel="stylesheet" href="/_catalogs/masterpage/sp-tabbed-containers/sp-tabbed-containers.css" />
<script id="tabs-navigation-template" type="text/x-handlebars-template">
<ul class="nav nav-tabs">
{{#each this}}
<li role="presentation" class="{{isActive @index}}"><a data-id="{{Id}}">{{Title}}</a></li>
{{/each}}
<li role="presentation" class="addNewTab hidden"><a data-id="addNew"><i class="fa fa-plus"></i> Add New</a></li>
</ul>
</script>
<script id="tabs-content-template" type="text/x-handlebars-template">
<div class="viewmode">
{{#each this}}
<div class="tab-item {{isHidden @index}}" data-id="{{Id}}">
{{{content}}}
</div>
{{/each}}
</div>
<div class="editmode hidden">
{{#each this}}
{{> tabForm}}
{{/each}}
<div class="addNewContainer"></div>
</div>
</script>
<script id="tabs-content-form-template" type="text/x-handlebars-template">
<div class="tab-item {{isHidden @index}}" data-id="{{Id}}">
<div class="form-group">
<label>Tab Title</label>
<input name="title" value="{{Title}}" class="form-control" / >
</div>
<div class="form-group">
<label>Content</label>
<div class="editable-content" class="form-control">{{content}}</div>
</div>
<div class="form-group tab-order-wrap col-lg-3 col-md-3 col-sm-3 col-xs-12">
<label>Tab Order</label>
<input name="tab-order" value="{{tab_x002d_order}}" class="form-control input-sm" / >
</div>
<div class="clearfix"></div>
<div class="form-group action-btns">
<button class="btn-success btn-sm btn save-changes"><i class="fa fa-floppy-o"></i> Submit</button>
<button class="btn-danger btn-sm btn delete-record"><i class="fa fa-ban"></i> Delete Tab</button>
</div>
</div>
</script>
<div class="tabs-wrapper" id="wp223343">
<div class="tabs-navigation"></div>
<div class="tabs-content"></div>
</div>
<script>
$(document).ready(function(){
var obj = {
'webPartId' : 'wp223343',
'listName' : 'tabs'
}
var tabs = SpTabs();
tabs.init(obj);
tabs.getContent();
});
</script>