@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add an "Unsubmitted" button to the Differential persistent header

Summary: Ref M1476. Same as D18070 but that did most of the magic.

Test Plan: {F4987961}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D18071

+64 -23
+20 -20
resources/celerity/map.php
··· 13 13 'core.pkg.js' => '1475bd91', 14 14 'darkconsole.pkg.js' => '1f9a31bc', 15 15 'differential.pkg.css' => '1ccbf3a9', 16 - 'differential.pkg.js' => 'b453b745', 16 + 'differential.pkg.js' => 'b2c4cbfa', 17 17 'diffusion.pkg.css' => 'b93d9b8c', 18 18 'diffusion.pkg.js' => '84c8f8fd', 19 19 'favicon.ico' => '30672e08', ··· 393 393 'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => '408bf173', 394 394 'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375', 395 395 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63', 396 - 'rsrc/js/application/diff/DiffChangeset.js' => 'fc3919c8', 397 - 'rsrc/js/application/diff/DiffChangesetList.js' => 'ffa063d8', 396 + 'rsrc/js/application/diff/DiffChangeset.js' => 'ee50a0ec', 397 + 'rsrc/js/application/diff/DiffChangesetList.js' => 'b4cf2217', 398 398 'rsrc/js/application/diff/DiffInline.js' => '1d17130f', 399 399 'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832', 400 400 'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07', ··· 772 772 'phabricator-darklog' => 'c8e1ffe3', 773 773 'phabricator-darkmessage' => 'c48cccdd', 774 774 'phabricator-dashboard-css' => 'fe5b1869', 775 - 'phabricator-diff-changeset' => 'fc3919c8', 776 - 'phabricator-diff-changeset-list' => 'ffa063d8', 775 + 'phabricator-diff-changeset' => 'ee50a0ec', 776 + 'phabricator-diff-changeset-list' => 'b4cf2217', 777 777 'phabricator-diff-inline' => '1d17130f', 778 778 'phabricator-drag-and-drop-file-upload' => '58dea2fa', 779 779 'phabricator-draggable-list' => 'bea6e7f4', ··· 1771 1771 'b3e7d692' => array( 1772 1772 'javelin-install', 1773 1773 ), 1774 + 'b4cf2217' => array( 1775 + 'javelin-install', 1776 + 'phuix-button-view', 1777 + ), 1774 1778 'b59e1e96' => array( 1775 1779 'javelin-behavior', 1776 1780 'javelin-stratcom', ··· 2088 2092 'javelin-behavior', 2089 2093 'javelin-uri', 2090 2094 ), 2095 + 'ee50a0ec' => array( 2096 + 'javelin-dom', 2097 + 'javelin-util', 2098 + 'javelin-stratcom', 2099 + 'javelin-install', 2100 + 'javelin-workflow', 2101 + 'javelin-router', 2102 + 'javelin-behavior-device', 2103 + 'javelin-vector', 2104 + 'phabricator-diff-inline', 2105 + ), 2091 2106 'efe49472' => array( 2092 2107 'javelin-install', 2093 2108 'javelin-util', ··· 2141 2156 'javelin-behavior-device', 2142 2157 'phabricator-keyboard-shortcut', 2143 2158 ), 2144 - 'fc3919c8' => array( 2145 - 'javelin-dom', 2146 - 'javelin-util', 2147 - 'javelin-stratcom', 2148 - 'javelin-install', 2149 - 'javelin-workflow', 2150 - 'javelin-router', 2151 - 'javelin-behavior-device', 2152 - 'javelin-vector', 2153 - 'phabricator-diff-inline', 2154 - ), 2155 2159 'fc91ab6c' => array( 2156 2160 'javelin-behavior', 2157 2161 'javelin-dom', ··· 2162 2166 'javelin-dom', 2163 2167 'javelin-view-visitor', 2164 2168 'javelin-util', 2165 - ), 2166 - 'ffa063d8' => array( 2167 - 'javelin-install', 2168 - 'phuix-button-view', 2169 2169 ), 2170 2170 ), 2171 2171 'packages' => array(
+2 -1
webroot/rsrc/js/application/diff/DiffChangeset.js
··· 451 451 end: block.items[jj] 452 452 }, 453 453 attributes: { 454 - unsaved: inline.isEditing() 454 + unsaved: inline.isEditing(), 455 + unsubmitted: inline.isDraft() 455 456 } 456 457 }; 457 458
+42 -2
webroot/rsrc/js/application/diff/DiffChangesetList.js
··· 113 113 114 114 _bannerNode: null, 115 115 _unsavedButton: null, 116 + _unsubmittedButton: null, 116 117 117 118 sleep: function() { 118 119 this._asleep = true; ··· 1371 1372 'diff-banner-has-unsubmitted', 1372 1373 !!unsubmitted.length); 1373 1374 1375 + var pht = this.getTranslations(); 1374 1376 var unsaved_button = this._getUnsavedButton(); 1375 - var pht = this.getTranslations(); 1377 + var unsubmitted_button = this._getUnsubmittedButton(); 1376 1378 1377 1379 if (unsaved.length) { 1378 1380 unsaved_button.setText(unsaved.length + ' ' + pht('Unsaved')); 1379 1381 JX.DOM.show(unsaved_button.getNode()); 1380 1382 } else { 1381 1383 JX.DOM.hide(unsaved_button.getNode()); 1384 + } 1385 + 1386 + if (unsubmitted.length) { 1387 + unsubmitted_button.setText( 1388 + unsubmitted.length + ' ' + pht('Unsubmitted')); 1389 + JX.DOM.show(unsubmitted_button.getNode()); 1390 + } else { 1391 + JX.DOM.hide(unsubmitted_button.getNode()); 1382 1392 } 1383 1393 1384 1394 var path_view = [icon, ' ', changeset.getDisplayPath()]; ··· 1388 1398 }; 1389 1399 1390 1400 var buttons_list = [ 1391 - unsaved_button.getNode() 1401 + unsaved_button.getNode(), 1402 + unsubmitted_button.getNode() 1392 1403 ]; 1393 1404 1394 1405 var buttons_view = JX.$N('div', buttons_attrs, buttons_list); ··· 1418 1429 return this._unsavedButton; 1419 1430 }, 1420 1431 1432 + _getUnsubmittedButton: function() { 1433 + if (!this._unsubmittedButton) { 1434 + var button = new JX.PHUIXButtonView() 1435 + .setIcon('fa-comment-o') 1436 + .setButtonType(JX.PHUIXButtonView.BUTTONTYPE_SIMPLE); 1437 + 1438 + var node = button.getNode(); 1439 + 1440 + var onunsubmitted = JX.bind(this, this._onunsubmittedclick); 1441 + JX.DOM.listen(node, 'click', null, onunsubmitted); 1442 + 1443 + this._unsubmittedButton = button; 1444 + } 1445 + 1446 + return this._unsubmittedButton; 1447 + }, 1448 + 1421 1449 _onunsavedclick: function(e) { 1422 1450 e.kill(); 1423 1451 ··· 1425 1453 filter: 'comment', 1426 1454 wrap: true, 1427 1455 attribute: 'unsaved' 1456 + }; 1457 + 1458 + this._onjumpkey(1, options); 1459 + }, 1460 + 1461 + _onunsubmittedclick: function(e) { 1462 + e.kill(); 1463 + 1464 + var options = { 1465 + filter: 'comment', 1466 + wrap: true, 1467 + attribute: 'unsubmitted' 1428 1468 }; 1429 1469 1430 1470 this._onjumpkey(1, options);