// -------------------------------------------------------------------------- \\
// File: SearchTextView.js                                                    \\
// Module: ControlViews                                                       \\
// Requires: TextView.js                                                      \\
// Author: Neil Jenkins                                                       \\
// License: © 2010-2015 FastMail Pty Ltd. MIT Licensed.                       \\
// -------------------------------------------------------------------------- \\

"use strict";

( function ( NS ) {

var ClearSearchButtonView = new NS.Class({

    Extends: NS.ButtonView,

    type: 'v-ClearSearchButton',
    positioning: 'absolute',
    label: NS.loc( 'Clear Search' ),
    shortcut: 'ctrl-/'
});

NS.ClearSearchButtonView = ClearSearchButtonView;

var SearchTextView = NS.Class({

    Extends: NS.TextView,

    type: 'v-SearchText',

    icon: null,

    draw: function ( layer, Element, el ) {
        var children =
                SearchTextView.parent.draw.call( this, layer, Element, el );
        children.push(
            this.get( 'icon' ),
            Element.when( this, 'value' ).show([
                new NS.ClearSearchButtonView({
                    target: this,
                    method: 'reset'
                })
            ]).end()
        );
        return children;
    },

    reset: function () {
        this.set( 'value', '' )
            .blur();
    }
});

NS.SearchTextView = SearchTextView;

}( O ) );

@@ -736,45 +736,8 @@
 e',%0A
-    label: NS.loc( 'Clear Search' ),%0A
     
@@ -1210,16 +1210,69 @@
 nView(%7B%0A
+                    label: NS.loc( 'Clear Search' ),%0A
         

Fix immediate call to NS.loc