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
@IBAction func FilterAction(sender: AnyObject) { | |
PortfolioView.deleteItemsAtIndexPaths([NSIndexPath(forItem: 0, inSection: 0), NSIndexPath(forItem: 1, inSection: 0), NSIndexPath(forItem: 2, inSection: 0)]) | |
self.PortfolioView!.reloadData() | |
} |
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
@IBAction func FilterAction(sender: AnyObject) { | |
PortfolioView.deleteItemsAtIndexPaths([NSIndexPath(forItem: 0, inSection: 0), NSIndexPath(forItem: 1, inSection: 0), NSIndexPath(forItem: 2, inSection: 0)]) | |
imageFileNames.removeRange(0...2) | |
self.PortfolioView!.reloadData() | |
} |
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
from django import forms | |
TABLE_CAT = ( | |
(GASOLINE_ENGINES, 'Gasoline Engines'), | |
(DIESEL_ENGINES, 'Diesel Engines'), | |
(EXHAUST_AFTERTREATMENT, 'Exhaust Aftertreatment'), | |
(ELECTRIFICATION, 'Electrification'), | |
(DRIVETRAIN_EFFICIENCY, 'Drivetrain Effieciency'), | |
) |
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
from django.db import models | |
class Product(models.Model): | |
YES = '1' | |
NO = '0' | |
SandA = 'S&A' | |
ES = 'ES' | |
FEM = 'FEM' | |
HEV = 'HEV' | |
TR = 'TR' |
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
from django.contrib import admin | |
from PowertrainExhibit.models import Product, Space | |
from django.forms import ModelForm | |
from suit_redactor.widgets import RedactorWidget | |
from suit.admin import SortableModelAdmin | |
class PostForm(ModelForm): | |
class Meta: | |
widgets = { | |
'body': RedactorWidget(editor_options={'lang': 'en'}), |
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
override func preferredLayoutAttributesFittingAttributes(layoutAttributes: UICollectionViewLayoutAttributes) -> UICollectionViewLayoutAttributes! { | |
return layoutAttributes | |
} |
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 UIKit | |
class ProductCell: UICollectionViewCell { | |
// The collection view cell's objects | |
var imageView: UIImageView! | |
var caption: UILabel! | |
var category : UILabel! | |
var bu : UILabel! | |
override func preferredLayoutAttributesFittingAttributes(layoutAttributes: UICollectionViewLayoutAttributes) -> UICollectionViewLayoutAttributes! { |
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
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { | |
var appDel:AppDelegate = UIApplication.sharedApplication().delegate as! AppDelegate | |
var context:NSManagedObjectContext = appDel.managedObjectContext! | |
// Initialize the reusable Collection View Cell with our custom class | |
icon = PortfolioView.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath) as! ProductCell | |
iconiPhone47 = PortfolioViewiPhone47.dequeueReusableCellWithReuseIdentifier(reuseIdentifieriPhone47, forIndexPath: indexPath) as! ProductCelliPhone47 |
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
<div id="nav"> | |
<ul> | |
<li><a class="<?php if (is_home()) echo 'current'; ?>" href="#">Menu1</a></li> | |
<li><a class="<?php if (is_single('contact')) echo 'current'; ?>" href="#">Menu2</a></li> | |
<li><a class="<?php if (is_single('about')) echo 'current'; ?>" href="#">Menu3</a></li> | |
</ul> | |
</div> |
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
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
var nav: UIViewController = NavViewController() | |
let navigationController = UINavigationController(rootViewController: nav) | |
self.window = UIWindow(frame: UIScreen.mainScreen().bounds) | |
self.window!.rootViewController = navigationController | |
self.window!.backgroundColor = UIColor.whiteColor() | |
self.window!.makeKeyAndVisible() |