Project

General

Profile

Feature #27758 » replace_write_with_edit.patch

Marius BĂLTEANU, 2018-09-26 11:24

View differences:

public/javascripts/jstoolbar/jstoolbar.js
52 52
  this.tabsBlock.className = 'jstTabs tabs';
53 53

  
54 54
  var This = this;
55
  this.writeTab = new jsTab('Write', true);
56
  this.writeTab.onclick = function(event) { This.hidePreview.call(This, event); return false; };
55

  
56
  this.editTab = new jsTab('Edit', true);
57
  this.editTab.onclick = function(event) { This.hidePreview.call(This, event); return false; };
57 58

  
58 59
  this.previewTab = new jsTab('Preview');
59 60
  this.previewTab.onclick = function(event) { This.showPreview.call(This, event); return false; };
......
62 63
  elementsTab.classList = 'tab-elements';
63 64

  
64 65
  var tabs = document.createElement('ul');
65
  tabs.appendChild(this.writeTab);
66
  tabs.appendChild(this.editTab);
66 67
  tabs.appendChild(this.previewTab);
67 68
  tabs.appendChild(elementsTab);
68 69
  this.tabsBlock.appendChild(tabs);
......
404 405
    this.toolbar.classList.add('hidden');
405 406
    this.textarea.classList.add('hidden');
406 407
    this.preview.classList.remove('hidden');
407
    this.tabsBlock.getElementsByClassName('tab-write')[0].classList.remove('selected');
408
    this.tabsBlock.getElementsByClassName('tab-edit')[0].classList.remove('selected');
408 409
    event.target.classList.add('selected');
409 410

  
410 411
  },
public/javascripts/jstoolbar/lang/jstoolbar-en.js
15 15
jsToolBar.strings['Preformatted text'] = 'Preformatted text';
16 16
jsToolBar.strings['Wiki link'] = 'Link to a Wiki page';
17 17
jsToolBar.strings['Image'] = 'Image';
18
jsToolBar.strings['Write'] = 'Write';
19
jsToolBar.strings['Preview'] = 'Preview';
18
jsToolBar.strings['Edit'] = 'Edit';
19
jsToolBar.strings['Preview'] = 'Preview';
(15-15/17)