Skip to content

Instantly share code, notes, and snippets.

View firecentaur's full-sized avatar
🏠
Working from home

Paul Preibisch firecentaur

🏠
Working from home
View GitHub Profile
$this->widget('zii.widgets.grid.CGridView', array(
'dataProvider' => $dataProvider,
'id'=>'order-grid',
'columns'=>array(
array(
'header' => 'Word',
'name'=> 'Word',
'value' => $data->lemma
@SethTompkins
SethTompkins / fileUpload.js
Created August 6, 2014 15:36
Angular factory for using angular-file-upload in any controller.
// replace dentalExchangeApp with the name of your Angular App.
// angular-file-upload.js needs to be included on your page,
// and included as a dependency in your App
dentalExchangeApp.factory('fileUpload', function($upload) {
return {
get: function($files, callback) {
//https://github.com/danialfarid/angular-file-upload
//callback is added so that you can access the returned data inside of your preferred scope.
var filename = $files[0].name;
for (var i = 0; i < $files.length; i++) {