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
''' | |
Copyright (c) 2011, Keith Hall <http://keith.io> | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, | |
are permitted provided that the following conditions are met: | |
Redistributions of source code must retain the above copyright notice, this list | |
of conditions and the following disclaimer. |
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
<form name="MailchimpSubscriptionForm" ng-controller="MailchimpSubscriptionCtrl"> | |
<div ng-hide="mailchimp.result === 'success'"> | |
<input class="hidden" type="hidden" ng-model="mailchimp.username" ng-init="mailchimp.username='username'"> | |
<input class="hidden" type="hidden" ng-model="mailchimp.dc" ng-init="mailchimp.dc='us1'"> | |
<input class="hidden" type="hidden" ng-model="mailchimp.u" ng-init="mailchimp.u='a1b2c3d4e5f6g7h8i9j0'"> | |
<input class="hidden" type="hidden" ng-model="mailchimp.id" ng-init="mailchimp.id='aabb12'"> | |
<input type="text" name="fname" ng-model="mailchimp.fname" placeholder="First name"> | |
<input type="text" name="lname" ng-model="mailchimp.lname" placeholder="Last name"> | |
<input type="email" name="email" ng-model="mailchimp.email" placeholder="Email address" required> | |
<button ng-disabled="MailchimpSubscriptionForm.$invalid" ng-click="addSubscription(mailchimp)">Join</button> |
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
Parse.Cloud.beforeSave('Post', function (request, respond) { | |
var post = request.object; | |
var prevCatId = post.get('prevCat').id; | |
var catId = post.get('cat').id; | |
if (post.dirty('cat')) { | |
var prev = new Parse.Query('Category'); | |
prev.get(prevCatId, { | |
success: function (category) { | |
// Decrement old category post count. |
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
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../paper-input/paper-input.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../paper-item/paper-item.html"> | |
<polymer-element name="my-element"> |
OlderNewer