聲明: 此並非爲官方聲明。我並非爲 io.js 官方代表,如果有任何問題,歡迎在 node-forward
一起討論
This file contains 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
(function (angular) { | |
'use strict'; | |
var app = angular.module('onfarm.dashboard'); | |
app.directive('gridsterTest', function (utils) { | |
return { | |
restrict: 'A', | |
replace: false, |
This file contains 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\extensions\helper; | |
use Assetic\AssetWriter; | |
use Assetic\AssetManager; | |
use Assetic\FilterManager; | |
use Assetic\Asset\AssetCache; | |
use Assetic\Asset\AssetCollection; | |
use Assetic\Asset\FileAsset; |
This file contains 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
jQuery.fn.center = function () { | |
this.css("position","absolute"); | |
this.css("top", Math.max(0, (($(window).height() - $(this).outerHeight()) / 2) + | |
$(window).scrollTop()) + "px"); | |
this.css("left", Math.max(0, (($(window).width() - $(this).outerWidth()) / 2) + | |
$(window).scrollLeft()) + "px"); | |
return this; | |
} |
This file contains 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
add_filter( 'mystile_homepage_product_categories_params', 'homepage_parent_categories_only' ); | |
function homepage_parent_categories_only( $params ) { | |
$params = 'parent="0"'; | |
return $params; | |
} |
This file contains 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
/** | |
* Usage: | |
* {{some_text | cut:true:100:' ...'}} | |
* Options: | |
* - wordwise (boolean) - if true, cut only by words bounds, | |
* - max (integer) - max length of the text, cut to this number of chars, | |
* - tail (string, default: ' …') - add this string to the input | |
* string if the string was cut. | |
*/ | |
angular.module('ng').filter('cut', function () { |
This file contains 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
class ApplicationController < ActionController::Base | |
before_filter :mobile_view_redirect | |
layout :which_layout | |
def mobile_device? | |
request.user_agent =~ /Mobile|webOS|Android/ | |
end | |
helper_method :mobile_device? |
This file contains 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
<span ng-bind="variableValue">Static indexed value</span> | |
<ul ng-include="'your/dynamic/list'"> | |
<li>seo-friendly item1</li> | |
<li>seo-friendly item2</li> | |
</ul> | |
<script type="text/ng-template" id="your/dynamic/list"> | |
<li ng-repeat="item in items" ng-bind="item.name"></li> | |
</script> |
OlderNewer