+
+Editor.prototype.sendPullRequest = function () {
+ if( $('.panel-wrap.changed').length != 0)
+ alert("There are unsaved changes - can't make a pull request.");
+
+ this.showPopup('not-implemented');
+/*
+ $.ajax({
+ url: '/pull-request',
+ dataType: 'json',
+ success: function(data, textStatus) {
+ $.log('data: ' + data);
+ },
+ error: function(rq, tstat, err) {
+ $.log('commit error', rq, tstat, err);
+ },
+ type: 'POST',
+ data: {}
+ }); */
+}
+
+Editor.prototype.showPopup = function(name, text)
+{
+ var self = this;
+ self.popupQueue.push( [name, text] )
+
+ if( self.popupQueue.length > 1)
+ return;
+
+ var box = $('#message-box > #' + name);
+ $('*.data', box).html(text);
+ box.fadeIn();
+
+ self._nextPopup = function() {
+ var elem = self.popupQueue.pop()
+ if(elem) {
+ var box = $('#message-box > #' + elem[0]);
+
+ box.fadeOut(300, function() {
+ $('*.data', box).html();
+
+ if( self.popupQueue.length > 0) {
+ box = $('#message-box > #' + self.popupQueue[0][0]);
+ $('*.data', box).html(self.popupQueue[0][1]);
+ box.fadeIn();
+ setTimeout(self._nextPopup, 5000);
+ }
+ });
+ }
+ }
+
+ setTimeout(self._nextPopup, 5000);
+}
+
+