Skip to content

Instantly share code, notes, and snippets.

🐻
Learning...

Sean G. Wright seangwright

View GitHub Profile
@seangwright
seangwright / kentico-modern-tools-kentico-ecommerce-utilities.csproj
Created Apr 18, 2019
kentico-modern-tools-kentico-ecommerce-utilities.csproj
View kentico-modern-tools-kentico-ecommerce-utilities.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<VersionPrefix>1.0.0</VersionPrefix>
<PackageDescription>Ecommerce utility classes for Kentico 12</PackageDescription>
<Copyright>2019</Copyright>
@seangwright
seangwright / ken120-mvc-vuejs-_Layout.cshtml
Last active Mar 5, 2019
ken120-mvc-vuejs-_Layout.cshtml
View ken120-mvc-vuejs-_Layout.cshtml
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>@ViewBag.Title</title>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
@seangwright
seangwright / ken120-mvc-vuejs-webpack.config.js
Last active Mar 5, 2019
ken120-mvc-vuejs-webpack.config.js
View ken120-mvc-vuejs-webpack.config.js
const path = require('path');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
module.exports = {
entry: path.resolve(__dirname, 'Scripts', 'inline-editors-bundle.js'),
output: {
path: path.resolve(__dirname, 'Content', 'InlineEditors'),
filename: "inline-editors-bundle.dist.js"
},
externals: [{
@seangwright
seangwright / ken120-mvc-vuejs-package.json
Last active Mar 5, 2019
ken120-mvc-vuejs-package.json
View ken120-mvc-vuejs-package.json
{
"name": "ken120-mvc-seed",
"version": "1.0.0",
"scripts": {
"start": "webpack --config webpack.config.js --watch",
"build": "webpack --config webpack.config.js --mode production"
},
"author": "",
"license": "ISC",
"dependencies": {
@seangwright
seangwright / ken120-mvc--vuejs-inline-editors-bundle.js
Created Mar 4, 2019
ken120-mvc--vuejs-inline-editors-bundle.js
View ken120-mvc--vuejs-inline-editors-bundle.js
import Vue from 'vue'
/*
* Add additional imports here when you create
* additional VueJs components
*/
import MediaSelectionEditor from
'../Content/InlineEditors/MediaSelectionEditor/media-selection-editor.vue';
/*
@seangwright
seangwright / ken120-mvc-vuejs-media-selection-editor-snippet.vue
Last active Mar 15, 2019
ken120-mvc-vuejs-media-selection-editor-snippet.vue
View ken120-mvc-vuejs-media-selection-editor-snippet.vue
<template>
<div>
<!-- HTML cut for brevity -->
</div>
</template>
<script>
export default {
props: {
hostUrl: String,
@seangwright
seangwright / ken120-mvc-vuejs-MediaLibraryApi.ashx
Last active Mar 5, 2019
ken120-mvc-vuejs-MediaLibraryApi.ashx
View ken120-mvc-vuejs-MediaLibraryApi.ashx
using System.Linq;
using System.Web;
using CMS.Helpers;
using CMS.MediaLibrary;
using CMS.Membership;
using CMS.SiteProvider;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace CMSApp.CMSPages
View ken120-mvc-vuejs-CorsModule.cs
using System;
using System.Configuration;
using System.Linq;
using System.Web;
namespace CMS.Cors
{
public class CorsModule : IHttpModule
{
private readonly string[] allowedOrigins;
@seangwright
seangwright / ken120-mvc-vuejs-media-selection-editor.vue
Last active Mar 15, 2019
ken120-mvc-vuejs-media-selection-editor.vue
View ken120-mvc-vuejs-media-selection-editor.vue
<template>
<div class="root">
<div class="row">
<div class="col-lg-3">
<div class="row">
<div class="col-lg-12">
<div class="selected-media mb-4">
<div>
<h4>Selected</h4>
<img :src="selectedMediaFullUrl" v-if="selectedMediaUrl">
@seangwright
seangwright / ken120-mvc-vuejs-media-selection-editor.js
Last active Mar 5, 2019
ken120-mvc-vuejs-media-selection-editor.js
View ken120-mvc-vuejs-media-selection-editor.js
(function() {
"use strict";
let appRoot = undefined;
window.kentico.pageBuilder.registerInlineEditor("media-selection-editor", {
init: function(options) {
const editor = options.editor;
appRoot = new Vue({
You can’t perform that action at this time.