1/* global POP, HELPER */ 2/* global VERSION */ 3 4var HELP = new HELP_CLASS(); 5 6/** 7 * manages help actions 8 * 9 * @author toolpic.com 10 */ 11function HELP_CLASS() { 12 13 //shortcuts 14 this.help_shortcuts = function () { 15 POP.add({title: "F9", value: 'Quick save'}); 16 POP.add({title: "F10", value: 'Quick load'}); 17 POP.add({title: "S", value: 'Save'}); 18 POP.add({title: "T", value: 'Trim'}); 19 POP.add({title: "D", value: 'Duplicate layer'}); 20 POP.add({title: "Del", value: 'Delete selection'}); 21 POP.add({title: "F", value: 'Auto adjust colors'}); 22 POP.add({title: "G", value: 'Grid on/off'}); 23 POP.add({title: "L", value: 'Rotate left'}); 24 POP.add({title: "N", value: 'New layer'}); 25 POP.add({title: "R", value: 'Resize'}); 26 POP.add({title: "-", value: 'Zoom out'}); 27 POP.add({title: "+", value: 'Zoom in'}); 28 POP.add({title: "CTRL + Z", value: 'Undo'}); 29 POP.add({title: "CTRL + A", value: 'Select all'}); 30 POP.add({title: "CTRL + V", value: 'Paste'}); 31 POP.add({title: "Arrow keys", value: 'Move active layer'}); 32 POP.show('Keyboard Shortcuts', ''); 33 }; 34 //about 35 this.help_about = function () { 36 var email = '[email protected]'; 37 POP.add({title: "Name:", value: "toolpic.com"}); 38 POP.add({title: "Version:", value: VERSION}); 39 POP.add({title: "Author:", value: 'toolpic.com'}); 40 POP.add({title: "Email:", html: '<a href="mailto:' + email + '">' + email + '</a>'}); 41 POP.add({title: "GitHub:", html: '<a href="https://www.toolpic.com">https://www.toolpic.com</a>'}); 42 POP.show('About', ''); 43 }; 44 45 //change language 46 this.help_translate = function (lang_code) { 47 48 //default English emty translator 49 var dict_en = {}; 50 51 //save cookie 52 if(lang_code != undefined && lang_code != LANG){
53 HELPER.setCookie('language', lang_code); 54 } 55 56 var dictionary_data = "dict_"+lang_code; 57 if(window[dictionary_data] != undefined || lang_code == 'en'){ 58 //translate 59 $('body').translate({lang: lang_code, t: window[dictionary_data]}); 60 LANG = lang_code; 61 } 62 else{ 63 console.log('Translate error, can not find dictionary: '+dictionary_data); 64 } 65 }; 66}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.