-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate and remove jQuery UI (CO-2230) (#17)
* Remove jQuery UI first commit. All index action command menus exposed as dropdowns by default for mobile. Dialog boxes converted to Bootstrap. (CO-2230) * Index action command menus visible on wider screens (not in dropdown). (CO-2230) * Change heading level for modal dialog box. (CO-2230) * Small stylistic improvements for modal dialog box. (CO-2230) * Update version comment for new file (CO-2230) * Update version comment for new file (CO-2230) * Stylistic improvements for dropdown menu and actions column (CO-2230) * Make modal dialog an element (CO-2230)
- Loading branch information
Showing
22 changed files
with
503 additions
and
2,594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| <?php | ||
| /** | ||
| * COmanage Match Menu Helper | ||
| * | ||
| * Portions licensed to the University Corporation for Advanced Internet | ||
| * Development, Inc. ("UCAID") under one or more contributor license agreements. | ||
| * See the NOTICE file distributed with this work for additional information | ||
| * regarding copyright ownership. | ||
| * | ||
| * UCAID licenses this file to you under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with the | ||
| * License. You may obtain a copy of the License at: | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * 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. | ||
| * | ||
| * @link http://www.internet2.edu/comanage COmanage Project | ||
| * @package match | ||
| * @since COmanage Registry v1.0.0 | ||
| * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) | ||
| */ | ||
|
|
||
| declare(strict_types = 1); | ||
|
|
||
| namespace App\View\Helper; | ||
|
|
||
| use \Cake\View\Helper; | ||
|
|
||
| class MenuHelper extends Helper { | ||
|
|
||
| public $helpers = ['Html']; | ||
|
|
||
| /** | ||
| * Get the Menu Order per action | ||
| * | ||
| * @param string $action | ||
| * @return int|null | ||
| * | ||
| * @since COmanage Match v1.0.0 | ||
| */ | ||
| public function getMenuOrder($action) { | ||
| if(empty($action)) { | ||
| return null; | ||
| } | ||
|
|
||
| $order = array( | ||
| 'View' => 5, // visibility | ||
| 'Edit' => 10, // edit | ||
| 'Duplicate' => 15, // content_copy | ||
| 'Default' => 20, // link - default starting order for arbitrary action menu items | ||
| 'Delete' => 100 // delete | ||
| ); | ||
|
|
||
| return $order[$action]; | ||
| } | ||
|
|
||
| /** | ||
| * Get the Menu Icon per action | ||
| * | ||
| * @param string $action | ||
| * @return string|null | ||
| * | ||
| * @since COmanage Match v1.0.0 | ||
| */ | ||
| public function getMenuIcon($action) { | ||
| if(empty($action)) { | ||
| return null; | ||
| } | ||
|
|
||
| $icon = array( | ||
| 'View' => 'visibility', | ||
| 'Edit' => 'edit', | ||
| 'Duplicate' => 'content_copy', | ||
| 'Default' => 'link', // default icon for arbitrary menu items | ||
| 'Delete' => 'delete' | ||
| ); | ||
|
|
||
| return $icon[$action]; | ||
| } | ||
|
|
||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.