nabinhait | c62e585 | 2011-06-17 17:22:28 +0530 | [diff] [blame] | 1 | if(user == 'Guest'){ |
Pratik Vyas | c1e6e4c | 2011-06-08 14:37:15 +0530 | [diff] [blame] | 2 | $dh(page_body.left_sidebar); |
| 3 | } |
| 4 | |
| 5 | var current_module; |
| 6 | var is_system_manager = 0; |
| 7 | var module_content_dict = {}; |
| 8 | var user_full_nm = {}; |
| 9 | |
| 10 | // check if session user is system manager |
| 11 | if(inList(user_roles,'System Manager')) is_system_manager = 1; |
| 12 | |
| 13 | function startup_setup() { |
| 14 | pscript.is_erpnext_saas = cint(locals['Control Panel']['Control Panel'].sync_with_gateway) |
| 15 | |
| 16 | |
| 17 | if(get_url_arg('embed')) { |
| 18 | // hide header, footer |
| 19 | $dh(page_body.banner_area); |
| 20 | $dh(page_body.wntoolbar); |
| 21 | $dh(page_body.footer); |
| 22 | return; |
| 23 | } |
| 24 | |
| 25 | if(user=='Guest' && !get_url_arg('akey')) { |
| 26 | if(pscript.is_erpnext_saas) { |
| 27 | window.location.href = 'https://www.erpnext.com'; |
| 28 | return; |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | // page structure |
| 33 | // -------------- |
| 34 | $td(page_body.wntoolbar.body_tab,0,0).innerHTML = '<i><b>erp</b>next</i>'; |
| 35 | $y($td(page_body.wntoolbar.body_tab,0,0), {width:'140px', color:'#FFF', paddingLeft:'8px', paddingRight:'8px', fontSize:'14px'}) |
| 36 | $dh(page_body.banner_area); |
| 37 | |
| 38 | // sidebar |
| 39 | // ------- |
| 40 | pscript.startup_make_sidebar(); |
| 41 | |
| 42 | // border to the body |
| 43 | // ------------------ |
| 44 | $dh(page_body.footer); |
| 45 | |
| 46 | // for logout and payment |
| 47 | var callback = function(r,rt) { |
| 48 | if(r.message){ |
Rushabh Mehta | d673db8 | 2011-07-18 11:36:43 +0530 | [diff] [blame] | 49 | login_file = 'http://' + r.message; |
Pratik Vyas | c1e6e4c | 2011-06-08 14:37:15 +0530 | [diff] [blame] | 50 | } |
| 51 | else { |
| 52 | |
Rushabh Mehta | 9b59f9c | 2011-07-18 11:31:12 +0530 | [diff] [blame] | 53 | login_file = 'http://www.erpnext.com'; |
Pratik Vyas | c1e6e4c | 2011-06-08 14:37:15 +0530 | [diff] [blame] | 54 | } |
| 55 | // setup toolbar |
| 56 | pscript.startup_setup_toolbar(); |
| 57 | } |
| 58 | $c_obj('Home Control', 'get_login_url', '', callback); |
| 59 | } |
| 60 | |
| 61 | // ==================================================================== |
| 62 | |
| 63 | pscript.startup_make_sidebar = function() { |
| 64 | $y(page_body.left_sidebar, {width:(100/6)+'%', paddingTop:'8px'}); |
| 65 | |
| 66 | var callback = function(r,rt) { |
| 67 | // menu |
| 68 | var ml = r.message; |
| 69 | |
| 70 | // clear |
| 71 | page_body.left_sidebar.innerHTML = ''; |
| 72 | |
| 73 | for(var m=0; m<ml.length; m++){ |
| 74 | if(ml[m]) { |
| 75 | new SidebarItem(ml[m]); |
| 76 | } |
| 77 | } |
| 78 | if(in_list(user_roles, 'System Manager')) { |
| 79 | var div = $a(page_body.left_sidebar, 'div', 'link_type', {padding:'8px', fontSize:'11px'}); |
| 80 | $(div).html('[edit]').click(pscript.startup_set_module_order) |
| 81 | } |
| 82 | nav_obj.observers.push({notify:function(t,dt,dn) { pscript.select_sidebar_menu(t, dt, dn); }}); |
| 83 | |
| 84 | // select current |
| 85 | var no = nav_obj.ol[nav_obj.ol.length-1]; |
| 86 | if(no && menu_item_map[decodeURIComponent(no[0])][decodeURIComponent(no[1])]) |
| 87 | pscript.select_sidebar_menu(decodeURIComponent(no[0]), decodeURIComponent(no[1])); |
| 88 | } |
| 89 | $c_obj('Home Control', 'get_modules', '', callback); |
| 90 | } |
| 91 | |
| 92 | // ==================================================================== |
| 93 | // Menu observer |
| 94 | // ==================================================================== |
| 95 | |
| 96 | cur_menu_pointer = null; |
| 97 | var menu_item_map = {'Form':{}, 'Page':{}, 'Report':{}, 'List':{}} |
| 98 | |
| 99 | pscript.select_sidebar_menu = function(t, dt, dn) { |
| 100 | // get menu item |
| 101 | if(menu_item_map[t][dt]) { |
| 102 | // select |
| 103 | menu_item_map[t][dt].select(); |
| 104 | } else { |
| 105 | // none found :-( Unselect |
| 106 | if(cur_menu_pointer) |
| 107 | cur_menu_pointer.deselect(); |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | // ==================================================================== |
| 112 | // Menu pointer |
| 113 | // ==================================================================== |
| 114 | |
| 115 | var body_background = '#e2e2e2'; |
| 116 | |
| 117 | MenuPointer = function(parent, label) { |
| 118 | |
| 119 | this.wrapper = $a(parent, 'div', '', {padding:'0px', cursor:'pointer', margin:'2px 0px'}); |
| 120 | $br(this.wrapper, '3px'); |
| 121 | |
| 122 | this.tab = make_table($a(this.wrapper, 'div'), 1, 2, '100%', ['', '11px'], {height:'22px', |
| 123 | verticalAlign:'middle', padding:'0px'}, {borderCollapse:'collapse', tableLayout:'fixed'}); |
| 124 | |
| 125 | $y($td(this.tab, 0, 0), {padding:'0px 4px', color:'#444', whiteSpace:'nowrap'}); |
| 126 | |
| 127 | // triangle border (?) |
| 128 | this.tab.triangle_div = $a($td(this.tab, 0, 1), 'div','', { |
| 129 | borderColor: body_background + ' ' + body_background + ' ' + body_background + ' ' + 'transparent', |
| 130 | borderWidth:'11px', borderStyle:'solid', height:'0px', width:'0px', marginRight:'-11px'}); |
| 131 | |
| 132 | this.label_area = $a($td(this.tab, 0, 0), 'span', '', '', label); |
| 133 | |
| 134 | $(this.wrapper) |
| 135 | .hover( |
| 136 | function() { if(!this.selected)$bg(this, '#eee'); } , |
| 137 | function() { if(!this.selected)$bg(this, body_background); } |
| 138 | ) |
| 139 | |
| 140 | $y($td(this.tab, 0, 0), {borderBottom:'1px solid #ddd'}); |
| 141 | |
| 142 | } |
| 143 | |
| 144 | // ==================================================================== |
| 145 | |
| 146 | MenuPointer.prototype.select = function(grey) { |
| 147 | $y($td(this.tab, 0, 0), {color:'#fff', borderBottom:'0px solid #000'}); |
| 148 | //$gr(this.wrapper, '#F84', '#F63'); |
| 149 | $gr(this.wrapper, '#888', '#666'); |
| 150 | this.selected = 1; |
| 151 | |
| 152 | if(cur_menu_pointer && cur_menu_pointer != this) |
| 153 | cur_menu_pointer.deselect(); |
| 154 | |
| 155 | cur_menu_pointer = this; |
| 156 | } |
| 157 | |
| 158 | // ==================================================================== |
| 159 | |
| 160 | MenuPointer.prototype.deselect = function() { |
| 161 | $y($td(this.tab, 0, 0), {color:'#444', borderBottom:'1px solid #ddd'}); |
| 162 | $gr(this.wrapper, body_background, body_background); |
| 163 | this.selected = 0; |
| 164 | } |
| 165 | |
| 166 | |
| 167 | // ==================================================================== |
| 168 | // Sidebar Item |
| 169 | // ==================================================================== |
| 170 | |
| 171 | var cur_sidebar_item = null; |
| 172 | |
| 173 | SidebarItem = function(det) { |
| 174 | var me = this; |
| 175 | this.det = det; |
| 176 | this.wrapper = $a(page_body.left_sidebar, 'div', '', {marginRight:'12px'}); |
| 177 | |
| 178 | this.body = $a(this.wrapper, 'div'); |
| 179 | this.tab = make_table(this.body, 1, 2, '100%', ['24px', null], {verticalAlign:'middle'}, {tableLayout:'fixed'}); |
| 180 | |
| 181 | // icon |
| 182 | var ic = $a($td(this.tab, 0, 0), 'div', 'module-icons module-icons-' + det.module_label.toLowerCase(), {marginLeft:'3px', marginBottom:'-2px'}); |
| 183 | |
| 184 | // pointer table |
| 185 | this.pointer = new MenuPointer($td(this.tab, 0, 1), det.module_label); |
| 186 | $y($td(this.pointer.tab, 0, 0), {fontWeight:'bold'}); |
| 187 | |
| 188 | // for page type |
| 189 | if(det.module_page) { |
| 190 | menu_item_map.Page[det.module_page] = this.pointer; |
| 191 | } |
| 192 | |
| 193 | // items area |
| 194 | this.items_area = $a(this.wrapper, 'div'); |
| 195 | |
| 196 | this.body.onclick = function() { me.onclick(); } |
| 197 | } |
| 198 | |
| 199 | // ==================================================================== |
| 200 | |
| 201 | SidebarItem.prototype.onclick = function() { |
| 202 | var me = this; |
| 203 | |
| 204 | if(this.det.module_page) { |
| 205 | // page type |
| 206 | this.pointer.select(); |
| 207 | |
| 208 | $item_set_working(me.pointer.label_area); |
| 209 | loadpage(this.det.module_page, function() { $item_done_working(me.pointer.label_area); }); |
| 210 | |
| 211 | } else { |
| 212 | // show sub items |
| 213 | this.toggle(); |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | // ==================================================================== |
| 218 | |
| 219 | SidebarItem.prototype.collapse = function() { |
| 220 | $(this.items_area).slideUp(); |
| 221 | this.is_open = 0; |
| 222 | $fg(this.pointer.label_area, '#444') |
| 223 | } |
| 224 | |
| 225 | // ==================================================================== |
| 226 | |
| 227 | SidebarItem.prototype.toggle = function() { |
| 228 | if(this.loading) return; |
| 229 | |
| 230 | if(this.is_open) { |
| 231 | this.collapse(); |
| 232 | } else { |
| 233 | if(this.loaded) $(this.items_area).slideDown(); |
| 234 | else this.show_items(); |
| 235 | this.is_open = 1; |
| 236 | $fg(this.pointer.label_area, '#000') |
| 237 | //this.pointer.select(1); |
| 238 | |
| 239 | // close existing open |
| 240 | if(cur_sidebar_item && cur_sidebar_item != this) { |
| 241 | cur_sidebar_item.collapse(); |
| 242 | } |
| 243 | cur_sidebar_item = this; |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | // ==================================================================== |
| 248 | |
| 249 | SidebarItem.prototype.show_items = function() { |
| 250 | this.loading = 1; |
| 251 | var me = this; |
| 252 | |
| 253 | $item_set_working(this.pointer.label_area); |
| 254 | var callback = function(r,rt){ |
| 255 | me.loaded = 1; |
| 256 | me.loading = 0; |
| 257 | var smi = null; |
| 258 | var has_reports = 0; |
| 259 | var has_tools = 0; |
| 260 | |
| 261 | // widget code |
| 262 | $item_done_working(me.pointer.label_area); |
| 263 | |
| 264 | if(r.message.il) { |
| 265 | me.il = r.message.il; |
| 266 | |
| 267 | // forms |
| 268 | for(var i=0; i<me.il.length;i++){ |
| 269 | if(me.il[i].doc_type == 'Forms') { |
| 270 | if(in_list(profile.can_read, me.il[i].doc_name)) { |
| 271 | var smi = new SidebarModuleItem(me, me.il[i]); |
| 272 | |
| 273 | menu_item_map['Form'][me.il[i].doc_name] = smi.pointer; |
| 274 | menu_item_map['List'][me.il[i].doc_name] = smi.pointer; |
| 275 | } |
| 276 | } |
| 277 | if(me.il[i].doc_type=='Reports') has_reports = 1; |
| 278 | if(in_list(['Single DocType', 'Pages', 'Setup Forms'], me.il[i].doc_type)) has_tools = 1; |
| 279 | } |
| 280 | // reports |
| 281 | if(has_reports) { |
| 282 | var smi = new SidebarModuleItem(me, {doc_name:'Reports', doc_type:'Reports'}); |
| 283 | |
| 284 | // add to menu-item mapper |
| 285 | menu_item_map['Page'][me.det.module_label + ' Reports'] = smi.pointer; |
| 286 | } |
| 287 | |
| 288 | // tools |
| 289 | if(has_tools) { |
| 290 | var smi = new SidebarModuleItem(me, {doc_name:'Tools', doc_type:'Tools'}); |
| 291 | |
| 292 | // add to menu-item mapper |
| 293 | menu_item_map['Page'][me.det.module_label + ' Tools'] = smi.pointer; |
| 294 | } |
| 295 | |
| 296 | // custom reports |
| 297 | if(r.message.custom_reports.length) { |
| 298 | me.il = add_lists(r.message.il, r.message.custom_reports); |
| 299 | var smi = new SidebarModuleItem(me, {doc_name:'Custom Reports', doc_type:'Custom Reports'}); |
| 300 | |
| 301 | // add to menu-item mapper |
| 302 | menu_item_map['Page'][me.det.module_label + ' Custom Reports'] = smi.pointer; |
| 303 | |
| 304 | } |
| 305 | |
| 306 | } |
| 307 | $(me.items_area).slideDown(); |
| 308 | |
| 309 | // high light |
| 310 | var no = nav_obj.ol[nav_obj.ol.length-1]; |
| 311 | if(no && menu_item_map[decodeURIComponent(no[0])][decodeURIComponent(no[1])]) |
| 312 | pscript.select_sidebar_menu(decodeURIComponent(no[0]), decodeURIComponent(no[1])); |
| 313 | |
| 314 | } |
| 315 | |
| 316 | $c_obj('Home Control', 'get_module_details', me.det.name, callback); |
| 317 | } |
| 318 | |
| 319 | // ==================================================================== |
| 320 | // Show Reports |
| 321 | // ==================================================================== |
| 322 | |
| 323 | SidebarItem.prototype.show_section = function(sec_type) { |
| 324 | var me = this; |
| 325 | var label = this.det.module_label + ' ' + sec_type; |
| 326 | var type_map = {'Reports':'Reports', 'Custom Reports':'Custom Reports', 'Pages':'Tools', 'Single DocType':'Tools', 'Setup Forms':'Tools'} |
| 327 | |
| 328 | if(page_body.pages[label]) { |
| 329 | loadpage(label, null, 1); |
| 330 | } else { |
| 331 | // make the reports page |
| 332 | var page = page_body.add_page(label); |
| 333 | this.wrapper = $a(page,'div','layout_wrapper'); |
| 334 | |
| 335 | |
| 336 | // head |
| 337 | this.head = new PageHeader(this.wrapper, label); |
| 338 | |
| 339 | // body |
| 340 | this.body1 = $a(this.wrapper, 'div', '', {marginTop:'16px'}); |
| 341 | |
| 342 | // add a report link |
| 343 | var add_link = function(det) { |
| 344 | var div = $a(me.body1, 'div', '', {marginBottom:'6px'}); |
| 345 | var span = $a(div, 'span', 'link_type'); |
| 346 | |
| 347 | // tag the span |
| 348 | span.innerHTML = det.display_name; span.det = det; |
| 349 | if(sec_type=='Reports' || sec_type=='Custom Reports') { |
| 350 | // Reports |
| 351 | // ------- |
| 352 | span.onclick = function() { loadreport(this.det.doc_name, this.det.display_name); } |
| 353 | |
| 354 | } else { |
| 355 | // Tools |
| 356 | // ----- |
| 357 | |
| 358 | if(det.doc_type=='Pages') { |
| 359 | // Page |
| 360 | if(det.click_function) { |
| 361 | span.onclick = function() { eval(this.det.click_function) } |
| 362 | span.click_function = det.click_function; |
| 363 | } else { |
| 364 | span.onclick = function() { loadpage(this.det.doc_name); } |
| 365 | } |
| 366 | } else if(det.doc_type=='Setup Forms') { |
| 367 | // Doc Browser |
| 368 | span.onclick = function() { loaddocbrowser(this.det.doc_name); } |
| 369 | } else { |
| 370 | // Single |
| 371 | span.onclick = function() { loaddoc(this.det.doc_name, this.det.doc_name); } |
| 372 | } |
| 373 | } |
| 374 | } |
| 375 | |
| 376 | // item list |
| 377 | for(var i=0; i<me.il.length;i++){ |
| 378 | if(type_map[me.il[i].doc_type] == sec_type) { |
| 379 | add_link(me.il[i]); |
| 380 | } |
| 381 | } |
| 382 | loadpage(label, null, 1); |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | |
| 387 | // ==================================================================== |
| 388 | // Sidebar module item |
| 389 | // ==================================================================== |
| 390 | |
| 391 | SidebarModuleItem = function(si, det) { |
| 392 | this.det = det; |
| 393 | var me= this; |
| 394 | |
| 395 | this.pointer = new MenuPointer(si.items_area, get_doctype_label(det.doc_name)); |
| 396 | $y(si.items_area, {marginLeft:'32px'}) |
| 397 | $y($td(this.pointer.tab, 0, 0), {fontSize:'11px'}); |
| 398 | |
| 399 | this.pointer.wrapper.onclick = function() { |
| 400 | if(me.det.doc_type=='Forms') |
| 401 | loaddocbrowser(det.doc_name); |
| 402 | else |
| 403 | si.show_section(me.det.doc_type); |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | |
| 408 | // ==================================================================== |
| 409 | // Drag & Drop order selection |
| 410 | // ==================================================================== |
| 411 | |
| 412 | pscript.startup_set_module_order = function() { |
| 413 | var update_order= function(ml) { |
| 414 | mdict = {}; |
| 415 | for(var i=0; i<ml.length; i++) { |
| 416 | mdict[ml[i][3][3]] = {'module_seq':ml[i][1], 'is_hidden':(ml[i][2] ? 'No' : 'Yes')} |
| 417 | } |
| 418 | $c_obj('Home Control', 'set_module_order', JSON.stringify(mdict), function(r,rt) { pscript.startup_make_sidebar(); } ) |
| 419 | } |
| 420 | |
| 421 | var callback = function(r, rt) { |
| 422 | var ml = []; |
| 423 | for(var i=0; i<r.message.length; i++) { |
| 424 | var det = r.message[i]; |
| 425 | ml.push([det[1], det[2], (det[3]!='No' ? 0 : 1), det[0]]); |
| 426 | } |
| 427 | new ListSelector('Set Module Sequence', 'Select items and set the order you want them to appear'+ |
| 428 | '<br><b>Note:</b> <i>These changes will apply to all users!</i>', ml, update_order, 1); |
| 429 | } |
| 430 | $c_obj('Home Control', 'get_module_order', '', callback) |
| 431 | |
| 432 | } |
| 433 | |
| 434 | // ==================================================================== |
| 435 | |
| 436 | pscript.startup_setup_toolbar = function() { |
| 437 | var menu_tab = page_body.wntoolbar.menu_table_right; |
| 438 | // Profile |
| 439 | // --------- |
| 440 | $td(menu_tab,0,0).innerHTML = '<a style="font-weight: bold; color: #FFF" href="javascript:'+"loadpage('profile-settings')"+'">'+user_fullname+'</a>'; |
| 441 | |
| 442 | if(pscript.is_erpnext_saas){ |
| 443 | // Help |
| 444 | // -------------- |
| 445 | //var help_url = login_file + '#!helpdesk' |
| 446 | $td(menu_tab,0,1).innerHTML = '<a style="font-weight: bold; color: #FFF" href="http://groups.google.com/group/erpnext-user-forum" target="_blank">Forum</a>'; |
| 447 | |
| 448 | // Manage account |
| 449 | // -------------- |
| 450 | if(is_system_manager) { |
Rushabh Mehta | 33a7f28 | 2011-07-06 10:42:21 +0530 | [diff] [blame] | 451 | $td(menu_tab,0,3).innerHTML = '<a style="font-weight: bold; color: #FFF;" href="#!billing">Billing</a>'; |
Pratik Vyas | c1e6e4c | 2011-06-08 14:37:15 +0530 | [diff] [blame] | 452 | } |
| 453 | } |
| 454 | else{ |
| 455 | $dh($td(menu_tab,0,1)); |
| 456 | $dh($td(menu_tab,0,3)); |
| 457 | } |
| 458 | |
| 459 | // Live Chat Help |
| 460 | // -------------- |
| 461 | $td(menu_tab,0,2).innerHTML = '<a style="font-weight: bold; color: #FFF" href="http://www.providesupport.com?messenger=iwebnotes" target="_blank">Chat</a>'; |
| 462 | |
| 463 | // help |
| 464 | // ---- |
| 465 | var cell = menu_tab.rows[0].insertCell(3); |
| 466 | cell.innerHTML = '<a style="font-weight: bold; color: #FFF" href="http://erpnext.blogspot.com/2011/03/erpnext-help.html" target="_blank">Help</a>'; |
| 467 | $y(cell, page_body.wntoolbar.right_table_style); |
| 468 | |
| 469 | } |
| 470 | |
Pratik Vyas | c1e6e4c | 2011-06-08 14:37:15 +0530 | [diff] [blame] | 471 | // chart of accounts |
| 472 | // ==================================================================== |
| 473 | show_chart_browser = function(nm, chart_type){ |
| 474 | |
| 475 | var call_back = function(){ |
| 476 | if(nm == 'Sales Browser'){ |
| 477 | var sb_obj = new SalesBrowser(); |
| 478 | sb_obj.set_val(chart_type); |
| 479 | } |
| 480 | else if(nm == 'Accounts Browser') |
| 481 | pscript.make_chart(chart_type); |
| 482 | } |
| 483 | loadpage(nm,call_back); |
| 484 | } |
| 485 | |
| 486 | |
| 487 | // Module Page |
| 488 | // ==================================================================== |
| 489 | |
| 490 | ModulePage = function(parent, module_name, module_label, help_page, callback) { |
| 491 | this.parent = parent; |
| 492 | |
| 493 | // add to current page |
| 494 | page_body.cur_page.module_page = this; |
| 495 | |
| 496 | this.wrapper = $a(parent,'div'); |
| 497 | this.module_name = module_name; |
| 498 | this.transactions = []; |
| 499 | this.page_head = new PageHeader(this.wrapper, module_label); |
| 500 | |
| 501 | if(help_page) { |
| 502 | var btn = this.page_head.add_button('Help', function() { loadpage(this.help_page) }, 1, 'ui-icon-help') |
| 503 | btn.help_page = help_page; |
| 504 | } |
| 505 | |
| 506 | if(callback) this.callback = function(){ callback(); } |
| 507 | } |
| 508 | |
| 509 | |
| 510 | // get plural |
| 511 | // ==================================================================== |
| 512 | |
| 513 | get_plural = function(str){ |
| 514 | if(str.charAt(str.length-1).toLowerCase() == 'y') return str.substr(0, str.length-1) + 'ies' |
| 515 | else return str + 's'; |
| 516 | } |
| 517 | |
| 518 | // set user fullname |
| 519 | // ==================================================================== |
| 520 | pscript.set_user_fullname = function(ele,username,get_latest){ |
| 521 | |
| 522 | var set_it = function(){ |
| 523 | if(ele) |
| 524 | ele.innerHTML = user_full_nm[username]; |
| 525 | } |
| 526 | |
| 527 | if(get_latest){ |
| 528 | $c_obj('Home Control','get_user_fullname',username, function(r,rt){ user_full_nm[username] = r.message; set_it(); }); |
| 529 | } |
| 530 | else{ |
| 531 | if(user_full_nm[username]){ |
| 532 | set_it(); |
| 533 | } |
| 534 | |
| 535 | else |
| 536 | $c_obj('Home Control','get_user_fullname',username, function(r,rt){ user_full_nm[username] = r.message; set_it(); }); |
| 537 | } |
| 538 | } |
| 539 | |
| 540 | // ==================================================================== |
| 541 | startup_setup(); |