curriculum-builder-TinyMCEjspanel.html 6.66 KB



<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 class="btn btn-black btn-sm" title="Rename Slide" onclick="cbRenameModelShow()">
                <img src="../../../content/images/CB/icon-tasks.png" alt="">
            </button>
            <button class="btn btn-black btn-sm" title="Lock" onclick="cbPasswordModelShow()">
                <img src="../../../content/images/CB/icon-lock.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>

                <!--<select ng-model="selectedCountry" ng-options="item.countryId as item.name for item in chooseCountries">
                    <option value="">Select Account</option>
                </select>-->
                <!--<!--<select class="form-control input-sm">
                    <option>What is Curriculum Builder</option>
                    <option>Prebuilt Curriculum</option>
                    <option>Creating a New Curriculum</option>
                    <option>Creating &amp; Capturing Content</option>
                    <option>Import &amp; Export Curriculum</option>
                    <option>Distributing Curriculum</option>
                </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 title="" 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">
        <!--Commented by sandeep for user story-49226(1)-->
        <!--<div class="col-sm-12 nopadding" title="Hyperlink">
            <button class="btn btn-black btn-sm btn-block marginTop5"  data-toggle="modal" data-target="#myModal-transparency-box"><img src="../../../content/images/CB/icon-link.png" alt="" title=""></button>
        </div>-->
        <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="" title=""></button>
        </div>
        <div class="col-sm-6 nopadding" title="Delete Current Slide">
            <button 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="" title=""></button>
        </div>



    </div>
    <div class="col-sm-11 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: 482,
            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();
    }

    //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>