curriculum-builder-TinyMCEjspanel.html
6.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<div class="col-sm-12 nopadding" ng-controller="CurrBuildController">
<div class="col-sm-12 nopadding">
<div class="form-inline" id="cbEditorTopMenuBar">
<!-- <button class="btn btn-primary btn-sm">
<img src="../../../content/images/CB/anchor-icon.png" alt="" title="">
</button> -->
<button id="btnRenameSlide" class="btn btn-black btn-sm" title="Rename Slide" onclick="cbRenameModelShow()">
<img src="../../../content/images/CB/icon-tasks.png" alt="">
</button>
<button id="btnLocking" class="btn btn-black btn-sm" title="Lock" onclick="cbPasswordModelShow()">
<img id="iconimage" src="../../../content/images/CB/unlock.png" />
</button>
<button class="btn btn-black btn-sm" title="Back" onclick="cbBack()">
<img src="../../../content/images/CB/icon-back.png" alt="">
</button>
<button class="btn btn-black btn-sm" title="Forward" onclick="cbNext()">
<img src="../../../content/images/CB/icon-next.png" alt="">
</button>
<div class="form-group">
<select id='cbSelect'></select>
<label class="font13" id="slideNumber" style="color:#fff !important">Slide 01 of 06</label>
</div>
<button class="btn btn-black btn-sm " id="hideShowEditor" onclick="editorHideShow()" title="Show/Hide Note"><img alt="" src="../../../content/images/CB/icon-note.png"></button>
<select id='viwerSelect' onchange="viwerSelectOnChange(this)" title="Captured Viewers"> </select>
</div>
</div>
<div class="col-sm-1 nopadding" id="cbEditorLeftSideBar" style="display:none">
<div class="col-sm-6 nopadding" title="Add Slide">
<button class="btn btn-black btn-sm marginTop5" onclick="CBAddNewSlide()"><img src="../../../content/images/CB/icon-addslide.png" alt=""></button>
</div>
<div class="col-sm-6 nopadding" title="Delete Current Slide">
<button id="deletecurrentslide" class="btn btn-black btn-sm pull-right marginTop5" data-toggle="modal" data-target="#deletecurrentslide" onclick="CBDeleteSlide()"><img src="../../../content/images/CB/icon-removeslide.png" alt=""></button>
</div>
<div class="col-sm-6 nopadding" title="Export Curriculum from here">
<button id="export_btn" class="btn btn-black btn-sm" style="height: 30px;width: 35px;" title="Export Curriculum from here" onclick="ExportSection()">
<img style="top: 5px;height: 20px;width: 25px;position: absolute;left: 5px;" src="../../../content/images/CB/export-cb.png" alt="">
</button>
</div>
<div class="col-sm-6 nopadding" title="Import Curriculum">
<button id="import_btn" class="btn btn-black btn-sm" style="height: 30px;width: 35px;" title="Import Curriculum" onclick="ImportSection()">
<img style="top: 5px;height: 20px;width: 25px;position: absolute;left: 5px;" src="../../../content/images/CB/import-cb.png" alt="">
</button>
</div>
</div>
<div class="col-sm-12 nopadding" id="cbEditorRightSideBar">
<textarea id="CBTextArea" style="margin-top: 37px;"></textarea>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
tinymce.remove();
tinymce.init({
selector: "#CBTextArea",
init_instance_callback: function (editor) {
editor.on('click', function (e) {
myeditorclick();
});
editor.setContent('');
},
setup: function (editor) {
editor.on('init', function () {
//birendra
// call after initilization
callEditorOnInit();
});
},
plugins: 'advlist, lists, autolink, link, anchor, print, preview, searchreplace, fullscreen, hr',
menubar: 'file edit view insert format',
toolbar: 'undo redo |fontsizeselect fontselect | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist | forecolor backcolor | link anchor | formatselect |strikethrough | outdent indent | removeformat | fullscreen preview print',
height: 450,
toolbar_drawer: 'sliding',
content_style: ".mce-content-body {font-size:14pt;font-family:Arial;}"
});
});
var previous;
$("#cbSelect").on('focus', function () {
previous = document.getElementById('cbSelect').value;
}).change(function() {
cbSelectOnChange(this,previous);
previous = this.value;
});
//Modified code by Sandeep for fixed bug TicketNo: 49226(6)
function editorHideShow() {
$("#cbEditorRightSideBar").toggle();
// $("#cbEditorLeftSideBar").toggle();
}
function cbRenameModelShow() {
angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().cbRenameModelShow();
}
function cbPasswordModelShow() {
angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().cbPasswordModelShow();
}
function cbBack() {
angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().cbBack();
}
function cbNext() {
angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().cbNext();
}
function CBAddNewSlide() {
angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().CBAddSlide();
}
function CBDeleteSlide() {
angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().showDeleteSlideModel();
}
function cbSelectOnChange(obj,prevValue) {
angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().cbSelectOnChange(obj,prevValue);
}
function myeditorclick() {
angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().myeditorclick();
}
function ExportSection() {
angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().ExportSection();
}
function ImportSection() {
angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().ImportSection();
}
//Added Code by Sandeep for User Story-52695
//function captureScreen() {
// angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().captureScreen();
//}
//Added Code by Sandeep for User Story-52696
function viwerSelectOnChange(obj) {
angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().viwerSelectOnChange(obj);
}
</script>