From b2ff7aaa177775341f41ccdca75ee4adbadaf93a Mon Sep 17 00:00:00 2001 From: Esanders Date: Thu, 2 Jul 2015 10:25:19 +0000 Subject: [PATCH] Revert "Show as surface placeholder, not an edit notice" This reverts commit 5ac5c7a05b9291029a39d9edb97f79fca0419d36. Bug: T104227 Change-Id: Id86dd228c2c671758acc6d2d3314c92da8917472 --- ApiVisualEditor.php | 4 +--- modules/ve-mw/init/ve.init.mw.Target.js | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php index b5c2a47f9e..10553156f3 100644 --- a/ApiVisualEditor.php +++ b/ApiVisualEditor.php @@ -369,9 +369,8 @@ class ApiVisualEditor extends ApiBase { } // New page notices - $placeholder = null; if ( !$title->exists() ) { - $placeholder = $this->msg( + $notices[] = $this->msg( $user->isLoggedIn() ? 'newarticletext' : 'newarticletextanon', wfExpandUrl( Skin::makeInternalOrExternalUrl( $this->msg( 'helppage' )->inContentLanguage()->text() @@ -520,7 +519,6 @@ class ApiVisualEditor extends ApiBase { $result = array( 'result' => 'success', 'notices' => $notices, - 'placeholder' => $placeholder, 'checkboxes' => $checkboxes, 'links' => $links, 'protectedClasses' => implode( ' ', $protectedClasses ), diff --git a/modules/ve-mw/init/ve.init.mw.Target.js b/modules/ve-mw/init/ve.init.mw.Target.js index 904f93d7be..62bab98db2 100644 --- a/modules/ve-mw/init/ve.init.mw.Target.js +++ b/modules/ve-mw/init/ve.init.mw.Target.js @@ -313,7 +313,6 @@ ve.init.mw.Target.onLoad = function ( response ) { this.constructor.static.fixBase( this.doc ); this.remoteNotices = ve.getObjectValues( data.notices ); - this.placeholderText = $( $.parseHTML( data.placeholder ) ).text(); this.protectedClasses = data.protectedClasses; this.$checkboxes = $( ve.getObjectValues( data.checkboxes ).join( '' ) ); // Populate checkboxes with default values for minor and watch @@ -1273,7 +1272,7 @@ ve.init.mw.Target.prototype.setupSurface = function ( doc, callback ) { // Create ui.Surface (also creates ce.Surface and dm.Surface and builds CE tree) ve.track( 'trace.createSurface.enter' ); - var surface = target.addSurface( dmDoc, { placeholder: target.placeholderText } ), + var surface = target.addSurface( dmDoc ), surfaceView = surface.getView(), $documentNode = surfaceView.getDocument().getDocumentNode().$element; ve.track( 'trace.createSurface.exit' );