+
+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)
+{
+ var self = this;
+ self.popupQueue.push(name)
+
+ if( self.popupQueue.length > 1)
+ return;
+
+ $('#message-box > #' + name).fadeIn();
+
+ self._nextPopup = function() {
+ var elem = self.popupQueue.pop()
+ if(elem) {
+ elem = $('#message-box > #' + elem);
+ elem.fadeOut(300, function() {
+ if( self.popupQueue.length > 0)
+ $('#message-box > #' + self.popupQueue[0]).fadeIn();
+ setTimeout(self._nextPopup, 1700);
+ });
+
+ }
+ }
+
+ setTimeout(self._nextPopup, 2000);
+}
+
+