A big thanks goes out to Sandeep Panda and his blog showing how to build an autocomplete for an Angular JS application.
http://www.htmlxprs.com/post/32/creating-an-angularjs-autocomplete-tag-input-widget
<?php | |
/** | |
* Implements hook_user_operations(). | |
*/ | |
function example_user_operations() { | |
$operations = array( | |
'example_resend_welcome_email' => array( | |
'label' => t('Re-send welcome e-mail'), | |
'callback' => 'example_resend_welcome_email', |
setInterval(function() { | |
$.mobile.loading('show', { | |
textVisible: true, | |
html: '<div style="text-align: center;"><h2>Saved!</h2></div>' | |
}); | |
setTimeout(function() { | |
$.mobile.loading().hide(); | |
}, 420); | |
}, 1); |
#my-button { | |
background-color: #4e69a2; | |
border-color: #435a8b #3c5488 #334c83; | |
color: #fff; | |
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); | |
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); | |
} | |
#my-button:after { | |
background-image: url("FB-f-Logo__white_29.png"); /* get image from https://www.facebookbrand.com/ */ | |
background-position: 0% 0%; |
/** | |
* @see https://www.drupal.org/documentation/entity-metadata-wrappers | |
* @example usage: my_dpm($wrapped_object); | |
*/ | |
function my_dpm($w) { | |
$values = array(); | |
foreach ($w->getPropertyInfo() as $key => $val) { | |
$values[$key] = $w->$key->value(); | |
} | |
$callers = debug_backtrace(); |
// Returns true if the account has the 'foo' or 'bar' roles. | |
return count(array_intersect($account->roles, ['foo', 'bar'])); |
'use strict'; | |
// Configure the angular-drupal module. | |
angular.module('angular-drupal').config(function($provide) { | |
$provide.value('drupalSettings', { | |
sitePath: 'http://test.easystreet3.com/drupal', // Example: 'http://example.com' with no trailing slash | |
basePath: '/', | |
endpoint: 'drupalgap', | |
language: 'und', | |
file_public_path: 'sites/default/files' // use public or private |
<?php | |
// ... | |
use Symfony\Component\HttpFoundation\Response; | |
// Then later on (inside your controller's class), you have a function used | |
// for the route_name (on a hook_menu() item in your .module file), this | |
// function can return a JSON response... |
A big thanks goes out to Sandeep Panda and his blog showing how to build an autocomplete for an Angular JS application.
http://www.htmlxprs.com/post/32/creating-an-angularjs-autocomplete-tag-input-widget
.idea | |
7 | |
8 | |
node_modules | |
7 | |
8 | |
.idea | |
node_modules | |
daux.io | |
api | |
docs | |
demo | |