Skip to content

Instantly share code, notes, and snippets.

View rissajeanne's full-sized avatar

Marissa Yuen rissajeanne

  • Agathon Group
  • Arizona, USA
View GitHub Profile
<li class="sidebarListIndent"><?php echo $this->Html->link('John August Swanson', array('controller' => 'john_swanson_serigraphs', 'action' => 'john_swanson_serigraphs_for_sale));?></li>
<?php $this->set('menuClass', 'john_swanson_serigraphs'); ?>
@rissajeanne
rissajeanne / votd.js
Created July 20, 2011 15:53
ABS Verse of the Day
ABS.Collection.DailyVerse = Backbone.Collection.extend({
model: ABS.Model.DailyVerse,
url: "http://dailybible.americanbible.org/api.php?format=json"
});
@rissajeanne
rissajeanne / getShareUrl.js
Created July 26, 2011 17:09
ABS.common.getShareUrl()
// Old
that.getShareUrl = function () {
return window.location.href.replace('/#', '/').replace('/%23', '/');
};
that.getShareUrl = function () {
var osisArr = ABS.verseSelector.getSelectedOsisSpans();
var osisUrl = ABS.util.osis.toUrl(osisArr[0][0]);
var version = ABS.spi.passagePanel.collection.first().get('version').id;
var root = window.location.protocol + "//" + window.location.host;
linkClick : function(ev) {
ev.preventDefault();
var breadcrumb = this.collection.getByCid($(ev.currentTarget).data('cid'));
this.trigger('breadcrumb:click', breadcrumb);
if (breadcrumb.get('slug') === 'home') {
window.ABS.spi.leftSidebar.makePanelActive('welcome');
if ($('.tools-nav li').hasClass('active')) {
$('.tools-nav li').removeClass('active');
}
else if ($('.actions li').hasClass('active')) {
addTag : function(ev) {
ev.preventDefault();
window.ABS.spi.leftSidebar.showTransferAnimation(ev.target);
$('.tools-nav li.active, .actions li.active').removeClass('active');
$('.tools-nav li a.tags').closest('li').addClass('active');
window.ABS.spi.leftSidebar.makePanelActive('tagCreate');
},
addNote : function(ev) {
ev.preventDefault();
<?php
$this->set('menuClass', 'gallery');
echo $this->element('noSearchMenu');
?>
#searchMenuBar ul.services-menu {
background: #ECEFE6 url(/img/services-nav-bg.jpg) no-repeat;
}
<?php
function i18nPOStrings() {
$locale = str_replace('-', '_', get_instance()->config->item('language_ui')->locale);
//$default = str_replace('-', '_', get_instance()->config->item('language_ui_default')->locale);
$dir = APPPATH . 'language/locale/' . $locale . '/LC_MESSAGES/';
$files = glob($dir . '*.po');
foreach ($files as $file) {
$contents .= file_get_contents($file) or die('Could not read from file.');
@rissajeanne
rissajeanne / viewport.js
Created November 8, 2011 17:50
set viewport
// Option A: reset maximum-scale on blur
var viewportMeta = $('meta[name="viewport"]');
$('select[name="filter"]').bind('focus blur', function(event) {
viewportMeta.attr('content', 'width=device-width,initial-scale=1,maximum-scale=' + (event.type == 'blur' ? 10 : 1));
});
// Option B: limit maximum-scale to 1
var viewportMeta = $('meta[name="viewport"]');