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
jQuery(function() { | |
window.magellan = function() { | |
obj = $('.magellan'); | |
pos = obj.offset().top; | |
pos2 = obj.next().offset().top-obj.innerHeight(); | |
$(window).scroll(function() { | |
if (pos < $(this).scrollTop() && !obj.hasClass('navbar-fixed-top')) return obj.addClass('navbar-fixed-top'); | |
if (pos2 > $(this).scrollTop()) return obj.removeClass('navbar-fixed-top'); | |
}); | |
} |
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
<?php | |
$appname = isset($appname) ? $appname : 'App Name'; | |
$pagename = ucfirst(isset($pagename) ? $pagename : Route::currentRouteName()); | |
$title = (isset($title) ? $title : $pagename).' | '; | |
?> | |
<!DOCTYPE html> | |
<html 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
@extends('layouts.master') | |
<?php | |
$route = Route::currentRouteName(); | |
if (!isset($user)) $user = User::find(Session::get('user_id')); | |
?> | |
@section('bodystyle') style="padding-top: 0!important;" @stop | |
@section('menu') |
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 action="/manager/user/add" class="form-horizontal" method="post"> | |
<div class="row"> | |
<div class="col-md-8"> | |
<div class="alert alert-danger alert-dismissable text-center hide"> | |
<i class="icon icon-exclamation-sign"></i> Gagal menyimpan. <span class="global-error"></span> | |
</div> | |
<div class="alert alert-success alert-dismissable text-center hide"> | |
<i class="icon icon-exclamation-sign"></i> Berhasil menyimpan | |
</div> | |
<div class="form-group"> |
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 action="/manager/user/edit" class="form-horizontal" method="post"> | |
<input type="hidden" name="id"> | |
<input type="hidden" name="_method" value="put"> | |
<div class="row"> | |
<div class="col-md-8"> | |
<div class="alert alert-danger alert-dismissable text-center hide"> | |
<i class="icon icon-exclamation-sign"></i> Gagal menyimpan. <span class="global-error"></span> | |
</div> | |
<div class="alert alert-success alert-dismissable text-center hide"> | |
<i class="icon icon-exclamation-sign"></i> Berhasil menyimpan |
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="modal-hapus" class="modal fade"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
<h4 class="modal-title">Menghapus User</h4> | |
</div> | |
<div class="modal-body"> | |
<div class="alert alert-danger alert-dismissable text-center hide"> | |
<i class="icon icon-exclamation-sign"></i> Gagal menyimpan. <span class="global-error"></span> |
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
//PHP | |
<script id="dataTemplate" type="text/x-jquery-tmpl"> | |
<tr data-id="${id}"> | |
<td>${no}.</td> | |
<td>${id_hero}</td> | |
<td>${username}</td> | |
<td>${nama}</td> | |
<td>${alamat}</td> | |
<td>${no_hp}</td> |
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
var backToCage = function() { | |
e = $('#edit-container'); | |
form = e.find('form'); | |
form[0].reset(); | |
form.find('.alert').addClass('hide'); | |
form.find('.global-error').html(''); | |
form.find('.form-group').removeClass('has-error'); | |
form.find('.error').html(''); | |
form.find('.uploadPreview').attr('src', noImage); | |
form.find('[name=photo]').val(noImage); |
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
('#tbody-data').delegate('tr .btn-edit', 'click', function(e) { | |
e.preventDefault(); | |
backToCage(); | |
btn = $(this); | |
tr = btn.parents('tr'); | |
id = tr.attr('data-id'); | |
$('#tbody-data tr.open-edit').next().remove(); | |
if (tr.is('.open-edit')) { | |
tr.removeClass('open-edit'); | |
return; |
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').each(function() { | |
$(this).off().submit(function(e) { | |
e.preventDefault(); | |
form = $(this); | |
url = form.attr('action'); | |
icon = form.find('button[type=submit] > .icon'); | |
icon.removeClass('hide'); | |
form.find('.alert').addClass('hide'); | |
form.find('.global-error').html(''); |
OlderNewer