Notify User if the talk page exists

Upon typing a title, the plugin will check for the main page, the talk
page, a draft page in the format 'draft:title' and the talk page for the
draft, in that order of importance

Known issues: The error message flashes a little when the name is being
typed, due to the different namespaces being checked.

http://www.google-melange.com/gci/task/view/google/gci2014/5877487489777664
https://github.com/WPAFC/afch-rewrite/issues/26
Oh! Yes, $.when().then() actually returns a list of return values from each
function. If you take out the $.when aspect, you can just do

```js
api.get( {
...
} ).done( function ( data ) {
    // access data.query... directly
```

That should work. Cheers,
On Dec 10, 2014 9:47 PM, "Evan" <notifications@github.com> wrote:

> In src/modules/submissions.js
> <https://github.com/WPAFC/afch-rewrite/pull/34#discussion-diff-21656700>:
>
> > @@ -1523,6 +1522,22 @@
> >  					}
> >  					page = new AFCH.Page( value );
> >
> > +					var linkToPage = AFCH.jQueryToHtml( AFCH.makeLinkElementToPage( page.rawTitle ) );
> > +
> > +					$.when(
> > +						AFCH.api.get( {
> > +							action: 'query',
> > +							prop: 'info',
> > +							inprop: 'protection',
> > +							namespace: 'talk',
> > +							titles: page.rawTitle
> > +						} )
> > +					).fail( function ( rawData ) {
>
> I did try that, but it would return null for rawData[0] I looked into it,
> and the .then(1, 2) is the same as .done(1).fail(2)
>
> http://api.jquery.com/deferred.then/
> http://api.jquery.com/deferred.done/
> http://api.jquery.com/deferred.fail/
>
> I'm not 100% sure, but it works for me and the .done() does not
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/WPAFC/afch-rewrite/pull/34/files#r21656700>.
>