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
import { createListenerMiddleware } from "@reduxjs/toolkit"; | |
import { authApi } from './authApi'; | |
import { api } from './baseApi'; | |
import type { RootState } from "../store"; | |
export const authListenerMiddleware = createListenerMiddleware(); | |
authListenerMiddleware.startListening({ | |
matcher: authApi.endpoints.login.matchFulfilled, | |
effect: (action, listenerApi) => { | |
localStorage.setItem( |
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 | |
namespace App\Library\Mixin; | |
trait QueryUnitOfWorkMixin | |
{ | |
public function queryUow($className, array $properties) | |
{ | |
foreach($this->getEntityManager()->getUnitOfWork()->getScheduledEntityInsertions() as $entity){ | |
if(is_a($entity, $className)){ |
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
'use strict'; | |
import Marionette from 'marionette'; | |
import viewTpl from './boxItemView.hbs!'; | |
import TrashListView from './trashListView.js'; | |
export default Marionette.LayoutView.extend({ | |
template: viewTpl, | |
tagName: 'li', | |
regions: { |
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
let filterChecklistItemViewTpl = '<label><input type="checkbox" name="{{name}}"" {{if isActive}}checked{{/if}} />{{title}}</label>'; | |
let filterViewTpl = '<div>{{filterTitle}}:<span data-ui="expandFilterButton" class="down-carret-thing></span></div><div data-region="filterChecklist"></div>'; | |
let FilterChecklistItemView = Marionette.LayoutView.extend({ | |
template: filterChecklistItemViewTpl, | |
ui: { | |
'checkbox': 'input[type="checkbox"]' | |
}, | |
events: { |
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
//credit to https://github.com/bazineta for the original | |
'use strict'; | |
import * as _ from 'underscore'; | |
import * as Marionette from 'marionette'; | |
// Save original Backbone.Stickit calls. | |
var stickit = Marionette.View.prototype.stickit; | |
var addBinding = Marionette.View.prototype.addBinding; |
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
'use strict'; | |
import Backbone from 'backbone'; | |
import Radio from 'backbone.radio'; | |
import Marionette from 'marionette'; | |
import MyselfModel from 'lib/common/models/myselfModel'; | |
import UserAccountCollection from 'lib/common/models/userAccountCollection'; | |
import AccountCollection from 'lib/common/models/accountCollection'; |
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
var TabOneContentView = Marionette.LayoutView.extend({ | |
template: '#viewOne' | |
}); | |
var TabTwoContentView = Marionette.LayoutView.extend({ | |
template: '#viewTwo' | |
}); | |
var TabItemView = Marionette.ItemView.extend({ | |
template: '#itemView', |
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
'use strict'; | |
import TransitionRegion from './transitionRegion'; | |
export default TransitionRegion.extend({ | |
//can override transitionIn and transitionOut with diff effects | |
//must trigger 'transition:out:complete' and optionally 'transition:in:complete' | |
transitionOut(){ | |
var region = this; |
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
var SpectrumDrawer = function(buffer){ | |
this.buffer = buffer; | |
this.bufferPosition = 0; | |
this.bufferLength = this.buffer.length; | |
var pixelWidth = $('#wave').width(); | |
this.sampleBufferLength = Math.floor(this.bufferLength / pixelWidth); | |
$('#spectrum').width(pixelWidth); | |
$('#spectrum').height($('#wave').height()); | |
this.spectrumCanvas = $('#spectrum').get(0); |
NewerOlder