Skip to content

Instantly share code, notes, and snippets.

View crosalot's full-sized avatar

Panudate Vasinwattana crosalot

View GitHub Profile
We couldn’t find that file to show.
23
24 var upload = {
25 onloadstart: function (evt) {
26 bar.addClass('uploading');
27 },
28
29 onprogress: function (evt) {
30 var percent = evnt.loaded/evt.total*100;
31 progress.css('width', percent + '%')
32 },
SELECT node.nid AS nid, COUNT(node_node_data_field_tourist_attraction.nid) AS node_node_data_field_tourist_attraction_nid, node_node_data_field_tourist_attraction.type AS node_node_data_field_tourist_attraction_type FROM node node LEFT JOIN content_field_day_plan node_data_field_day_plan ON node.vid = node_data_field_day_plan.vid LEFT JOIN flexifield_items flexifield_items_node_data_field_day_plan ON node_data_field_day_plan.field_day_plan_item_id = flexifield_items_node_data_field_day_plan.item_id LEFT JOIN content_field_tourist_attraction flexifield_items_node_data_field_day_plan_node_data_field_tourist_attraction ON flexifield_items_node_data_field_day_plan.item_id = flexifield_items_node_data_field_day_plan_node_data_field_tourist_attraction.vid LEFT JOIN node node_node_data_field_tourist_attraction ON flexifield_items_node_data_field_day_plan_node_data_field_tourist_attraction.field_tourist_attraction_nid = node_node_data_field_tourist_attraction.nid WHERE node.type in ('travel_log') GROUP BY node_node_d
@crosalot
crosalot / openhelp.mysql.sql
Created November 6, 2011 09:44 — forked from nazt/openhelp.mysql.sql
openhelp.mysql.sql
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
CREATE TABLE IF NOT EXISTS `location` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`level0` varchar(255),
`level1` varchar(255),
`level2` varchar(255),
`level3` varchar(255),
@crosalot
crosalot / gist:3775229
Created September 24, 2012 09:56
MTD notify template
{% load common_tags %}
{% load i18n %}
<li class="notification-item service-{{ notification.service|to_ }}{% if notification.status == notification.STATUS_NEW %} notification-new{% endif %} clearfix">
{% if notification.service == 'Relationship' %}
{{ notification.src_user|fullnamelink }} {% trans 'followed you' %} <span class="noti-time">{{ notification.created|date:'f a' }}</span>
{% elif notification.service == 'Goal' %}
{% spaceless %}
{% load common_tags %}
{% load comment_tags %}
{% load i18n %}
<{% if tag %}{{ tag }}{% else %}li{% endif %} class="notification-item service-{{ notification.service|to_ }}{% if notification.status == notification.STATUS_NEW or notification.status == notification.STATUS_NEW2 %} notification-new{% endif %} clearfix">
{% if notification.service == 'Relationship' %}
{{ notification.src_user|fullnamelink }} {% trans 'followed you' %} {% if display_time %}<span class="noti-time">{{ notification.created|date:'f a' }}</span>{% endif %}<span></span>
<!DOCTYPE html>
<html>
<head>
<title>SUbmit form</title>
</head>
<body>
<script type="text/javascript">var popup_submitted=false;</script>
<iframe name="hidden_iframe" id="hidden_iframe" style="display: none;"
onload="if(popup_submitted) {window.location=window.location;}"></iframe>
@crosalot
crosalot / box top and bottom with table style
Created February 19, 2014 07:01
CSS create sidebar and content and in sidebar box top and bottom with table style
<style>
.wrapper {
height: 100%;
position: relative;
}
.sidebar {
width: 100px;
float: left;
height: 100%;
position: absolute;
<?php
function relative_to_absolute ($text) {
$lang = language_default();
global $base_path;
$text = preg_replace(
'/(src|href)=(\'|")' . preg_quote($base_path, '/') . '/',
'$1=$2'. url('<front>', array('absolute' => TRUE, 'language' => $lang)),
'use strict';
angular
.module('odmbase')
.controller('SocialFeedCtrl', ['$scope', '$window', '$http', '$timeout', 'Auth', 'CommonGoal', 'Update', 'User', SocialFeedCtrl]);
function SocialFeedCtrl ($scope, $window, $http, $timeout, Auth, CommonGoal, Update, User) {