X-Git-Url: http://nitlanguage.org diff --git a/share/nitdoc/js/plugins/github/commitbox.js b/share/nitdoc/js/plugins/github/commitbox.js index 5bb31db..aa03f79 100644 --- a/share/nitdoc/js/plugins/github/commitbox.js +++ b/share/nitdoc/js/plugins/github/commitbox.js @@ -11,79 +11,68 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - Documentation generator for the nit language. - Generate API documentation in HTML format from nit source code. */ /* - * Nitdoc.GitHub.CommitBox instance + * CommitBox allows user to add a message and sign its commit */ define([ "jquery", - "plugins/github/ui", -], function($, UI) { -console.log(UI); - // Init new commit box instance - var CommitBox = { - - // Open commit box instance - open: function(infos) { - $("body").append( - $(document.createElement("div")) - .attr("id", "nitdoc-github-commitBox-fade") - .addClass("nitdoc-github-fade") - ); - $("body").append( - $(document.createElement("div")) + "jQueryUI" +], function($) { + $.widget("nitdoc.commitbox", { + + options: { + title: "Commit changes" + }, + + _create: function() { + this._fade = this._buildFade(); + $("body").append(this._fade); + this._commitBox = $("
") + .hide() .attr("id", "nitdoc-github-commitBox") .addClass("nitdoc-github-modal") .append( - $(document.createElement("a")) + $("") .addClass("nitdoc-github-close") .attr("title", "Close") .append("x") - .click(function() { CommitBox.close() }) + .click($.proxy(this.close, this)) ) - .append("

Commit changes

") + .append("

" + this.options.title + "

") .append( - $(document.createElement("div")) + $("
") .append( - $(document.createElement("label")) + $("