[483] | 1 | function showModal() {
|
---|
| 2 | console.log('Show modal!');
|
---|
| 3 | $('#alert-services').modal('show');
|
---|
| 4 | }
|
---|
| 5 |
|
---|
| 6 | $('#services-reg').click(function() {
|
---|
| 7 | $('#alert-services').modal('hide');
|
---|
| 8 | $('#alert-services-reg').modal('show');
|
---|
| 9 | });
|
---|
| 10 | $('#services-sign').click(function() {
|
---|
| 11 | $('#alert-services-reg').modal('hide');
|
---|
| 12 | $('#alert-services-reg-2').modal('show');
|
---|
| 13 | })
|
---|
| 14 |
|
---|
| 15 | var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
|
---|
| 16 | var g_Flash = null;
|
---|
| 17 | var g_cbData = "";
|
---|
| 18 |
|
---|
| 19 | function InitViolet() {
|
---|
| 20 | g_Flash = document.getElementById('LectorEditorOnline');
|
---|
| 21 | //g_Flash = $('#LectorEditorOnline');
|
---|
| 22 | //g_Flash = isInternetExplorer ? LectorEditorOnline : document.LectorEditorOnline;
|
---|
| 23 | };
|
---|
| 24 |
|
---|
| 25 | function GetClipboardItem() {
|
---|
| 26 | var cbData = window.clipboardData? window.clipboardData.getData('Text'): g_cbData;
|
---|
| 27 | g_Flash.SetVariable("clipboardData", cbData);
|
---|
| 28 | g_Flash.SetVariable("command", "Get Text");
|
---|
| 29 | };
|
---|
| 30 |
|
---|
| 31 | function SetClipboardItem(args) {
|
---|
| 32 | if (window.clipboardData) window.clipboardData.setData('Text', args);
|
---|
| 33 | else g_cbData = args;
|
---|
| 34 | g_Flash.SetVariable("command", "Set OK");
|
---|
| 35 | };
|
---|
| 36 |
|
---|
| 37 | function SetWindowTitle(fileName) {
|
---|
| 38 | if (fileName == "") document.title = "Violet Online";
|
---|
| 39 | else {
|
---|
| 40 | var docName = fileName.substring(0, fileName.length - 4);
|
---|
| 41 | document.title = "Violet Online - " + docName;
|
---|
| 42 | }
|
---|
| 43 | };
|
---|
| 44 |
|
---|
| 45 | function SetWindowState() {
|
---|
| 46 | var full = (g_Flash.width == "100%");
|
---|
| 47 | g_Flash.width = full? "800": "100%";
|
---|
| 48 | g_Flash.height = full? "580": "100%";
|
---|
| 49 | };
|
---|
| 50 |
|
---|
| 51 | // Handle all the FSCommand messages in a Flash movie.
|
---|
| 52 | function LectorEditorOnline_DoFSCommand(command, args) {
|
---|
| 53 | switch (command) {
|
---|
| 54 | case "Set Title": SetWindowTitle(args); break;
|
---|
| 55 | case "Get Clipboard": GetClipboardItem(); break;
|
---|
| 56 | case "Set Clipboard": SetClipboardItem(args); break;
|
---|
| 57 | case "Set State": SetWindowState(); break;
|
---|
| 58 | case "Quit": window.open('','_self').close(); break;
|
---|
| 59 | case "trace": alert(args); break;
|
---|
| 60 | case "Check License": showModal(); break;
|
---|
| 61 | }
|
---|
| 62 | };
|
---|
| 63 |
|
---|
| 64 | // Hook for Internet Explorer.
|
---|
| 65 | if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
|
---|
| 66 | document.write('<script language=\"VBScript\"\>\n');
|
---|
| 67 | document.write('On Error Resume Next\n');
|
---|
| 68 | document.write('Sub LectorEditorOnline_FSCommand(ByVal command, ByVal args)\n');
|
---|
| 69 | document.write(' Call LectorEditorOnline_DoFSCommand(command, args)\n');
|
---|
| 70 | document.write('End Sub\n');
|
---|
| 71 | document.write('</script\>\n');
|
---|
| 72 | };
|
---|
| 73 |
|
---|
| 74 | $(document).ready(function(){
|
---|
| 75 | InitViolet();
|
---|
| 76 | }) |
---|