This file contains hidden or 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
function myAutocomplete ($document, $timeout, $compile) { | |
return { | |
restrict: 'A', | |
scope: { | |
onSelectModel: '=' | |
}, | |
template: require('./autocomplete.html'), | |
transclude: true, | |
link: (scope, element, attrs) => { | |
$document.ready(() => { |
This file contains hidden or 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
<?php | |
/** | |
* @author: [email protected] | |
*/ | |
namespace common\components\storage; | |
/** | |
* A component to Store File into local storage/path. | |
* Just add this component to your configuration providing this class, |
This file contains hidden or 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
add_action('add_meta_boxes', 'gov_meta_box_add'); | |
function gov_meta_box_add() | |
{ | |
add_meta_box('post-meta-box-id', 'Event Type', 'gov_meta_box_cb', 'post', 'side', 'high'); | |
add_meta_box('page-meta-box-id', 'Event Type', 'gov_meta_box_cb', 'page', 'side', 'high'); | |
} | |
function gov_meta_box_cb($post) | |
{ | |
$values = get_post_custom($post->ID); // error_log(json_encode($values)); |
This file contains hidden or 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
// have this inside your Users model | |
public function getUserType() | |
{ | |
return $this->type == 1 ? "Administrator" : "User"; | |
} | |
// modify your grid as this | |
<?php |
NewerOlder