Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F727029
D124.id300.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jan 6, 5:18 AM
Size
2 KB
Mime Type
text/x-diff
Expires
Tue, Jan 7, 5:18 AM (2 d, 22 h ago)
Engine
blob
Format
Raw Data
Handle
537096
Attached To
D124: INP-1473 - Add "edit_field" parameter to "AdminEditButton" tag
D124.id300.diff
View Options
Index: core/admin_templates/incs/footer.tpl
===================================================================
--- core/admin_templates/incs/footer.tpl
+++ core/admin_templates/incs/footer.tpl
@@ -56,4 +56,22 @@
<div id="nlsMenuPlace"></div>
</body>
-</html>
\ No newline at end of file
+</html>
+
+<inp2:m_if check="m_Get" name="edit_field">
+ <script type="text/javascript">
+ var $row = get_control('<inp2:adm_PassedPrefixTag tag="InputName" name="#FIELD_NAME#" js_escape="1"/>', '<inp2:m_Get name="edit_field"/>', 'row');
+
+ if ( $row ) {
+ <inp2:m_if check="adm_UsePopups">
+ Application.setHook('m:OnAfterFormInit', function () {
+ $('#scroll_container_container').scrollTop($($row).offset().top - $('#scroll_container_container').offset().top);
+ });
+ <inp2:m_else/>
+ $(document).ready(function () {
+ parent.frames['main'].scrollBy(0, $($row).offset().top);
+ });
+ </inp2:m_if>
+ }
+ </script>
+</inp2:m_if>
Index: core/kernel/db/db_event_handler.php
===================================================================
--- core/kernel/db/db_event_handler.php
+++ core/kernel/db/db_event_handler.php
@@ -1811,10 +1811,14 @@
$event->SetRedirectParam($event->getPrefixSpecial() . '_id', array_shift($ids));
$event->SetRedirectParam('pass', 'all,' . $event->getPrefixSpecial());
- $simultaneous_edit_message = $this->Application->GetVar('_simultaneous_edit_message');
+ $pass_through = array('_simultaneous_edit_message', 'edit_field');
- if ( $simultaneous_edit_message ) {
- $event->SetRedirectParam('_simultaneous_edit_message', $simultaneous_edit_message);
+ foreach ( $pass_through as $name ) {
+ $value = $this->Application->GetVar($name);
+
+ if ( $value ) {
+ $event->SetRedirectParam($name, $value);
+ }
}
}
Index: core/units/admin/admin_tag_processor.php
===================================================================
--- core/units/admin/admin_tag_processor.php
+++ core/units/admin/admin_tag_processor.php
@@ -1219,4 +1219,20 @@
return $this->Application->ParseBlock($block_params);
}
+
+ /**
+ * Processes tag of passed prefix
+ *
+ * @param array $params Tag params.
+ *
+ * @return string
+ */
+ protected function PassedPrefixTag(array $params)
+ {
+ $prefix = explode(',', $this->Application->GetVar('passed'));
+ $prefix = array_pop($prefix);
+
+ return $this->Application->ProcessParsedTag($prefix, $params['tag'], $params);
+ }
+
}
Event Timeline
Log In to Comment